uber / orbit

A Python package for Bayesian forecasting with object-oriented design and probabilistic models under the hood.
https://orbit-ml.readthedocs.io/en/stable/
Other
1.85k stars 132 forks source link

Question: How to set 'date' frequency to minutes \ seconds? #837

Closed DeagleGross closed 7 months ago

DeagleGross commented 7 months ago

I have a dataset which has a frequency of 3 minutes: image

prediction code worked, and I have an output: image

however plotting failed with TypeError: unsupported operand type(s) for -: 'str' and 'str'

_ = plot_predicted_data(training_actual_df=train_df, predicted_df=predicted_df,
                        date_col=date_col, actual_col=response_col,
                        test_actual_df=test_df, markersize=10, lw=.5)

Can orbit plot data which has a more frequent data than dates? How can I set it up?

Thanks in advance!

DeagleGross commented 7 months ago

Leaving this for somebody as dumb as me: 1) frequency can be controlled via date_freq parameter of models. For example date_freq='3min', 2) make sure that your "date" column is of datetime64[ns] type. In my case it was a string.