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

  • 相关阅读:
    C++继承与派生的概念、什么是继承和派生
    为什么要用重载(学习笔记)
    C++ 为什么要用覆盖(学习笔记)
    做一个爱分享的人技术牛人博客
    okhttp head()请求
    android 8.0 前台服务问题
    android 配置 kotlin 使用jdk1.8编译
    java 获取apk包的版本号、包路径。权限信息
    vue 自定义input控件 v-model 绑定数据问题
    android ViewModel 列表数据获取条数
  • 原文地址:https://www.cnblogs.com/emanlee/p/14413617.html
Copyright © 2020-2023  润新知