facebook / prophet

Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.
https://facebook.github.io/prophet
MIT License
18.27k stars 4.51k forks source link

tick_w = max(df_none['horizon'].astype('timedelta64[ns]')) / 10. #2465

Open mansourshams opened 1 year ago

mansourshams commented 1 year ago

I just installed prophet on Anaconda in a 64 bit machine. When executing plot_cross_validation_metric(df,metric='mape')

I get

File ~\anaconda3\Lib\site-packages\prophet\plot.py:524, in plot_cross_validation_metric(df, metric, rolling_window, ax, figsize, color, point_color) 520 df_h = performance_metrics(df, metrics=[metric], rolling_window=rolling_window) 522 # Some work because matplotlib does not handle timedelta 523 # Target ~10 ticks. --> 524 tick_w = max(df_none['horizon'].astype('timedelta64[ns]')) / 10. 525 # Find the largest time resolution that has <1 unit per bin. 526 dts = ['D', 'h', 'm', 's', 'ms', 'us', 'ns']

TypeError: 'NoneType' object is not subscriptable

I even reverted to a previous version 1.1.3 and it causes the same error.

Please advise.

AlexandroLuis commented 1 year ago

do a: print(type(df)) and verify it's type