plt.legend()
plt.grid()
plt.show()
model = AutoTS(forecast_length=40, frequency=‘infer’, ensemble=‘simple’, drop_data_older_than_periods=100)
model = model.fit(df, date_col=‘Date’, value_col=’ Close/Last’, id_col=None)
这将运行数百个模型。你将在输出窗格中看到运行的各种模型。让我们看看模型如何预测:
prediction = model.predict()
forecast = prediction.forecast
print(“Stock Price Prediction of Apple”)
print(forecast)
temp_df[’ Close/Last’].plot(figsize=(15,8), title= ‘AAPL Stock Price’, fontsize=18, label=‘Train’)
forecast[’ Close/Last’].plot(figsize=(15,8), title= ‘AAPL Stock Price’, fontsize=18, label=‘Test’)
plt.legend()
plt.grid()
plt.show()
更多详细信息可以查看 Github: https://github.com/winedarksea/AutoTS
官网文档: https://winedarksea.github.io/AutoTS/build/html/source/tutorial.html
3、Prophet
Prophet是Facebook研究团队开发的知