近日在尝试使用fbprophet算法替换原来的ARIMA做时序预测,安装过程中踩过的坑先不提(后面有时间会另起一篇说明),此处单说一个很莫名其妙的问题。
在跑官方示例的时候:
import pandas as pd
import numpy as np
from fbprophet import Prophet
import matplotlib.pyplot as plt
df = pd.read_excel('example_wp_peyton_manning.xlsx')
df['y'] = np.log(df['y'])
playoffs = pd.DataFrame({
'holiday': 'playoff',
'ds': pd.to_datetime(['2008-01-13', '2009-01-03', '2010-01-16',
'2010-01-24', '2010-02-07', '2011-01-08',
'2013-01-12', '2014-01-12', '2014-01-19',
'2014-02-02', '2015-01-11', '2016-01-17',
'2016-01-24', '2016-02-07']),
'lower_window': 0,
'upper_window': 1,
})
superbowl