我正在使用Prophet预测销售,并使用饱和度参数来避免出现负值:
df_prof = df_prof.sample(1000) df_prof['cap'] = 6000 df_prof['floor'] = 10
m = Prophet(growth='logistic')
m.fit(df_prof)
future = m.make_future_dataframe(periods=365)
future['cap'] = 6000
future['floor'] = 10
forecast = m.predict(future)
fig1 = m.plot(forecast)
fig2 = m.plot_components(forecast)
但预测值超出了两个阈值,即下限和上限。