prophet單變量預測

# https://facebook.github.io/prophet/docs/quick_start.html import pandas as pd from fbprophet import Prophet from fbprophet import __version__ print(__version__) df = pd.read_csv('prophet/examples/example_wp_log_peyton_manning.csv') df.head() m = Prophet(interval_width=0.6) m.fit(df) future = m.make_future_dataframe(periods=365) print(future.tail()) X_data = pd.DataFrame(data={'ds': ['2020-02-15', '2019-02-14']}) forecast = m.predict(X_data) future_forecast = forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail(365) print(future_forecast.shape) print(future_forecast)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章