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

  • 相关阅读:
    网页爬虫小记:两种方式的爬取网站内容
    AOP中使用Aspectj对接口访问权限进行访问控制
    Spring Boot应用总结更新
    SpringBoot集成mybatis配置
    经验收集
    关于阿拉伯文开发的一点经验
    关于IDataReader.GetSchemaTable的一些事情
    removing vmware debugger from visual studio
    SQL Server 2008 R2 附加数据库 “尝试打开或创建物理文件 拒绝访问”的解决办法
    Visual Studio 2013 ReportViewer Control
  • 原文地址:https://www.cnblogs.com/emanlee/p/14413617.html
Copyright © 2011-2022 走看看