Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python FB Prophet:如何减少Timeseries预测错误?_Python_Pandas_Time Series_Forecasting_Facebook Prophet - Fatal编程技术网

Python FB Prophet:如何减少Timeseries预测错误?

Python FB Prophet:如何减少Timeseries预测错误?,python,pandas,time-series,forecasting,facebook-prophet,Python,Pandas,Time Series,Forecasting,Facebook Prophet,我预测2020年第四季度的日销售额,日数据可追溯到2017年1月。为此目的使用FB Prophet。我的数据具有每周、每月和每年的季节性。通常,预测误差在未来的几天/几周内较低,然后在几周后增加。在我的例子中,我注意到一个奇怪的问题,预测误差最初很低,然后在第20天左右出现峰值并下降。我没有任何额外的回归。你知道我可能会错过什么吗 #Measuring Forecast error using historical data m = Prophet(changepoint_prior_scale

我预测2020年第四季度的日销售额,日数据可追溯到2017年1月。为此目的使用FB Prophet。我的数据具有每周、每月和每年的季节性。通常,预测误差在未来的几天/几周内较低,然后在几周后增加。在我的例子中,我注意到一个奇怪的问题,预测误差最初很低,然后在第20天左右出现峰值并下降。我没有任何额外的回归。你知道我可能会错过什么吗

#Measuring Forecast error using historical data
m = Prophet(changepoint_prior_scale=0.01,holidays_prior_scale = 30)
m.add_country_holidays(country_name='US')
m.add_seasonality(name = "monthly", period = 30.5, fourier_order=5)
m.fit(df)
cutoffs = pd.to_datetime(['2020-09-30'])
df_cv = cross_validation(m, cutoffs = cutoffs, horizon='46 days', parallel="processes")
df_p = performance_metrics(df_cv)
#Plotting Forecast error
fig= plot_cross_validation_metric(df_cv,metric = "mape",rolling_window=0.15)
以下是我的预测错误图:


您的数据中是否存在任何缺口?不。我的数据没有任何漏洞。你的数据有漏洞吗?不。我的数据没有任何缺口。