# Python
m = Prophet(holidays=holidays)
forecast = m.fit(df).predict(future)
# Python
m = Prophet(holidays=holidays)
m.add_country_holidays(country_name='US')
m.fit(df)
# Python
forecast = m.predict(future)
fig = m.plot_components(forecast)
# Python
from fbprophet.plot import plot_yearly
m = Prophet().fit(df)
a = plot_yearly(m)
# Python
from fbprophet.plot import plot_yearly
m = Prophet(yearly_seasonality=20).fit(df)
a = plot_yearly(m)
# Python
m = Prophet(weekly_seasonality=False)
m.add_seasonality(name='monthly', period=30.5, fourier_order=5)
forecast = m.fit(df).predict(future)
fig = m.plot_components(forecast)
# Python
m = Prophet(weekly_seasonality=False)
m.add_seasonality(name='weekly_on_season', period=7, fourier_order=3, condition_name='on_season')
m.add_seasonality(name='weekly_off_season', period=7, fourier_order=3, condition_name='off_season')
future['on_season'] = future['ds'].apply(is_nfl_season)
future['off_season'] = ~future['ds'].apply(is_nfl_season)
forecast = m.fit(df).predict(future)
fig = m.plot_components(forecast)
# Python
m = Prophet()
m.add_seasonality(
name='weekly', period=7, fourier_order=3, prior_scale=0.1)
m = Prophet(daily_seasonality=False)
m.add_seasonality(name='weekday_daily', period=1, fourier_order=4, condition_name='is_weekday')
m.add_seasonality(name='weekend_daily', period=1, fourier_order=4, condition_name='is_weekend')
model.add_seasonality(name='weekly', period=7, fourier_order=12)
m.add_seasonality(name='monthly', period=30.5, fourier_order=5)
add_seasonality(name = 'quarterly, period = 90.5, fourier_order = 48)
add_seasonality(name='yearly', period=365, fourier_order=20)
m.add_seasonality(name='daily', period=1, fourier_order=15)
add_seasonality(name='yearly', period=365.25, fourier_order=3, prior_scale=10, mode='additive')
m.add_seasonality(name='daily', period=1,fourier_order=10,mode= 'multiplicative')
m.add_seasonality(name='daily', period=1, fourier_order=15)
make_future_dataframe(model_prophet, periods = 365, freq = "day")
Prophet
原创
©著作权归作者所有:来自51CTO博客作者emanlee的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章