假设我训练了先知的模式:
weekly.columns = ['y', 'ds']# change column names so that Prophet likes them
m = Prophet(growth = "linear", mcmc_samples = 0,
holidays=holidays, holidays_prior_scale=1,
seasonality_mode = "multiplicative",
seasonality_prior_scale = 10,
changepoint_prior_scale=1,
#n_changepoints = 5,
yearly_seasonality=False,
weekly_seasonality=False,
daily_seasonality=False, interval_width =0.95).fit(weekly)
future = m.make_future_dataframe(periods=1, freq='W')
fcst = m.predict(future)
然后,使用进行下一周的预测。因此,预测包含大量不同属性。有什么更好的方法与实际情况相结合来进行预测?
#making a forecast
future = m.make_future_dataframe(periods = 1, freq = 'w')
forecast = m.predict(future)
forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail()
forecast['actuals'] = weekly['y']?