zoukankan      html  css  js  c++  java
  • Prophet

    # 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")

  • 相关阅读:
    Alchemy解决方案使得大型主机应用程序能在Windows Azure上运行
    Hello China操作系统微博:http://weibo.com/2196920292
    GDI+ 学习记录(12): 矩形 Rectangle、Rectangles
    GDI+ 学习记录(6): 使用画刷建立画笔
    GDI+ 学习记录(8): 阴影画刷 HatchBrush
    GDI+ 学习记录(5): 复合画笔
    GDI+ 学习记录(11): 路径渐变画刷 PathGradientBrush
    GDI+ 学习记录(7): 实心画刷 SolidBrush
    GDI+ 学习记录(4): 画笔对齐
    GDI+ 学习记录(13): 弧线 Arc
  • 原文地址:https://www.cnblogs.com/emanlee/p/14413617.html
Copyright © 2011-2022 走看看