網(wǎng)站首頁(yè) 編程語(yǔ)言 正文
Python庫(kù)AutoTS一行代碼得到最強(qiáng)時(shí)序基線_python
作者:Python學(xué)習(xí)與數(shù)據(jù)挖掘 ? 更新時(shí)間: 2022-05-28 編程語(yǔ)言時(shí)間序列問題無論是在銷量預(yù)測(cè),天氣預(yù)測(cè)還是在股票預(yù)測(cè)等問題中都至關(guān)重要,而如今隨著機(jī)器學(xué)習(xí)等快速發(fā)展,已經(jīng)出現(xiàn)了非常多時(shí)間序列建模相關(guān)的工具包,今天介紹一種非常霸道的工具,融合了自動(dòng)化機(jī)器學(xué)習(xí)技術(shù)開發(fā)的AutoTS。
Auto TS會(huì)先對(duì)數(shù)據(jù)進(jìn)行預(yù)處理,從數(shù)據(jù)中刪除異常值,通過學(xué)習(xí)尋找最佳的NaN值。只需使用一行代碼,就可以訓(xùn)練多個(gè)時(shí)間序列模型,包括ARIMA、SARIMAX、FB Prophet、VAR,并得出效果最佳的模型。
AutoTS
Auto TS是一個(gè)關(guān)于時(shí)間序列預(yù)測(cè)的開源Python庫(kù)。
該庫(kù)是 autoML 的一部分,其目標(biāo)是為初學(xué)者提供自動(dòng)化庫(kù)。
它可以在僅僅使用一行Python代碼中訓(xùn)練多個(gè)時(shí)間序列預(yù)測(cè)模型,包括ARIMA、SARIMAX、FB Prophet、VAR等,然后在從中選擇最佳模型進(jìn)行預(yù)測(cè)。其中AutoTS包含的技術(shù)有:
- 遺傳規(guī)劃優(yōu)化方法尋找最優(yōu)時(shí)間序列預(yù)測(cè)模型。
- 訓(xùn)練簡(jiǎn)單的模型、統(tǒng)計(jì)模型、機(jī)器學(xué)習(xí)模型和深度學(xué)習(xí)模型,同時(shí)涉及到所有可能的超參數(shù)配置和交叉驗(yàn)證。
- 其它
代碼
# !pip install autots from autots import auto_timeseries import pandas as pd df = pd.read_csv("./data/data.csv", usecols=['Date', 'Close']) df['Date'] = pd.to_datetime(df['Date']) df = df.sort_values('Date')
train_df.Close.plot(figsize=(15,8), title= 'AMZN Stock Price', fontsize=14, label='Train') test_df.Close.plot(figsize=(15,8), title= 'AMZN Stock Price', fontsize=14, label='Test') plt.legend() plt.grid() plt.show()
model = auto_timeseries(forecast_period=219, score_type='rmse', time_interval='D', model_type='best') model.fit(traindata= train_df, ts_column="Date", target="Close") future_predictions = model.predict(testdata=219)
小結(jié)
Auto TS是一個(gè)非常不錯(cuò)的時(shí)間序列Baseline工具包,集成了非常多經(jīng)典的時(shí)序模型,在碰到時(shí)間序列問題時(shí),可以考慮使用AutoTS來進(jìn)行訓(xùn)練和預(yù)測(cè),作為一個(gè)非常不錯(cuò)的基線。
參考文獻(xiàn)
Train multiple Time Series Forecasting Models in one line of Python Code
https://pypi.org/project/AutoTS/
https://github.com/winedarksea/AutoTS
原文鏈接:https://blog.csdn.net/weixin_38037405/article/details/123726457
相關(guān)推薦
- 2022-08-05 RedisConfig 配置文件
- 2022-04-27 python如何將多個(gè)模型的ROC曲線繪制在一張圖(含圖例)_python
- 2022-03-03 【問題】remote: Support for password authentication wa
- 2021-12-06 centos7.6批量增加修改刪除虛擬網(wǎng)卡操作介紹_Linux
- 2022-09-25 spring如何解決循環(huán)依賴
- 2022-04-18 python?request?post?列表的方法詳解_python
- 2022-07-02 react+typescript使用window.ethereum報(bào)錯(cuò)
- 2022-04-26 C#元組類型ValueTuple用法詳解_實(shí)用技巧
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡(jiǎn)單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對(duì)象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支