2022最新開源時序模型匯總(含Code)
最新開源時間序列工具包

tsfresh(GitHub:6.3K+)
https://tsfresh.readthedocs.io/en/latest/
tsfresh是一個python包,它會自動計算大量的時間序列特征。此外,該軟件包還包含評估此類特征對回歸或分類任務(wù)的解釋能力和重要性的方法。tsfresh可以自動提取特征構(gòu)建特征。如下圖所示,tsfresh可以自動從時間序列中提取100秒的特征。這些特征描述了時間序列的基本特征,如
峰值數(shù)量; 平均值或最大值; 更復(fù)雜的特征,如時間反轉(zhuǎn)對稱性統(tǒng)計。

這些特征可以用來構(gòu)建時間序列上的統(tǒng)計或機器學(xué)習(xí)模型,例如用于回歸或分類任務(wù)。
Sktime(Github:5.2K+)
Sktime是Python中用于時間序列分析的庫。它為多個時間序列學(xué)習(xí)任務(wù)提供了統(tǒng)一的界面。目前,這包括:
時間序列分類、回歸、聚類、預(yù)測等。
它配有時間序列算法和scikit learn兼容工具,用于構(gòu)建、調(diào)整和驗證時間序列模型。
目前Sktime包含了大量的時間序列模型,詳見:https://www.sktime.org/en/stable/estimator_overview.html
兒Darts(GitHub:3.9K+)
https://github.com/unit8co/darts
Darts是一個Python庫,要求Python 3.7及以上版本為佳,Darts包含非常多的模型,從經(jīng)典的ARIMA到深度神經(jīng)網(wǎng)絡(luò)。
Darts中的模型可以以只餓極使用fit()和predict()函數(shù),類似于scikit learn。 Darts可以方便地對模型進行回溯測試,組合多個模型的預(yù)測,并加入外部數(shù)據(jù)。 Darts支持單變量和多變量時間序列和模型。

Kats(Github:3.6K+)
https://github.com/facebookresearch/Kats
Kats是一個分析時間序列數(shù)據(jù)的工具包,是一個輕量級、易于使用而且具有非常好泛化能力的框架,用于執(zhí)行時間序列分析。
Kats旨在為時間序列分析提供一站式服務(wù),包括檢測、預(yù)測、特征提取/嵌入、多元分析等。05
GluonTS(Github2.6K+)
https://github.com/awslabs/gluon-ts
GluonTS是一個用于概率時間序列建模的Python軟件包,專注于基于深度學(xué)習(xí)的模型。不過目前非常多的模型都是基于MXNET實現(xiàn)的。
GluonTS的特點如下:
使用MXNet和PyTorch實現(xiàn)的最先進模型; 通過Amazon SageMaker輕松實現(xiàn)AWS集成; 用于加載和迭代時間序列數(shù)據(jù)集的實用程序; 用于評估模型性能并比較其準(zhǔn)確性的實用程序; 用于定義自定義模型和快速實驗的構(gòu)建塊
pytorch-forecasting(Github 1.9K+)
https://github.com/jdb78/pytorch-forecasting
pytorch Forecasting是一個基于pytorch的工具包,開發(fā)了很多最新的深度時間序列模型。它為pandas數(shù)據(jù)幀上的培訓(xùn)網(wǎng)絡(luò)提供了一個高級API,并利用PyTorch Lightning在(多個)GPU、CPU上進行可擴展的培訓(xùn),以及自動記錄。
目前涉及的模型包括:
Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting which outperforms DeepAR by Amazon by 36-69% in benchmarks N-BEATS: Neural basis expansion analysis for interpretable time series forecasting which has (if used as ensemble) outperformed all other methods including ensembles of traditional statical methods in the M4 competition. The M4 competition is arguably the most important benchmark for univariate time series forecasting. N-HiTS: Neural Hierarchical Interpolation for Time Series Forecasting which supports covariates and has consistently beaten N-BEATS. It is also particularly well-suited for long-horizon forecasting. DeepAR: Probabilistic forecasting with autoregressive recurrent networks which is the one of the most popular forecasting algorithms and is often used as a baseline Simple standard networks for baselining: LSTM and GRU networks as well as a MLP on the decoder A baseline model that always predicts the latest known value
tsai(Github:1.9K+)
https://github.com/timeseriesAI/tsai
tsai是在Pytorch&fastai基礎(chǔ)上開發(fā)的開源深度學(xué)習(xí)軟件包,專注于時間序列任務(wù)的最新技術(shù),如分類、回歸、預(yù)測等。
目前tsai仍然還在不斷開發(fā)中,目前涵蓋的模型包括:
LSTM (Hochreiter, 1997) (paper) GRU (Cho, 2014) (paper) MLP - Multilayer Perceptron (Wang, 2016) (paper) gMLP - Gated Multilayer Perceptron (Liu, 2021) (paper) FCN - Fully Convolutional Network (Wang, 2016) (paper) ResNet - Residual Network (Wang, 2016) (paper) LSTM-FCN (Karim, 2017) (paper) GRU-FCN (Elsayed, 2018) (paper) mWDN - Multilevel wavelet decomposition network (Wang, 2018) (paper) TCN - Temporal Convolutional Network (Bai, 2018) (paper) MLSTM-FCN - Multivariate LSTM-FCN (Karim, 2019) (paper) InceptionTime (Fawaz, 2019) (paper) Rocket (Dempster, 2019) (paper) XceptionTime (Rahimian, 2019) (paper) ResCNN - 1D-ResCNN (Zou , 2019) (paper) TabModel - modified from fastai's TabularModel OmniScale - Omni-Scale 1D-CNN (Tang, 2020) (paper) TST - Time Series Transformer (Zerveas, 2020) (paper) TabTransformer (Huang, 2020) (paper) GatedTabTransformer (Cholakov, 2022) (paper) MiniRocket (Dempster, 2021) (paper) XCM - An Explainable Convolutional Neural Network (Fauvel, 2021) (paper)
Deep Learning Time Series(Github:1.6K+)
https://github.com/Alro10/deep-learning-time-series
深度學(xué)習(xí)應(yīng)用于實踐序列大論文,代碼以及相關(guān)的實驗等,不過目前該Git的更新已經(jīng)不是非常頻繁了。
Flow Forecast(Github 950+)
https://github.com/AIStream-Peelout/flow-forecast
流量預(yù)測(FF)是一個針對時間序列預(yù)測框架的開源深度學(xué)習(xí)。它提供了所有最先進的模型(變形金剛、注意力模型、GRU)和前沿概念,以及易于理解的可解釋性指標(biāo)、云提供商集成和模型服務(wù)功能。Flow Forecast是第一個支持基于transformer的模型的時間序列框架,也是唯一一個真正的時間序列預(yù)測框架的端到端深度學(xué)習(xí)。目前,CoronaWhy的任務(wù)TS主要維護該存儲庫。歡迎拉取請求。歷史上,該存儲庫為山洪暴發(fā)和河流流量預(yù)測提供了開源基準(zhǔn)和代碼。
目前涵蓋的模型包括:
Vanilla LSTM (LSTM): A basic LSTM that is suitable for multivariate time series forecasting and transfer learning. Full transformer (SimpleTransformer in model_dict): The full original transformer with all 8 encoder and decoder blocks. Requires passing the target in at inference. Simple Multi-Head Attention (MultiHeadSimple): A simple multi-head attention block and linear embedding layers. Suitable for transfer learning. Transformer with a linear decoder (CustomTransformerDecoder in model_dict): A transformer with n-encoder blocks (this is tunable) and a linear decoder. DA-RNN: (DARNN) A well rounded model with which utilizes a LSTM + attention. Enhancing the Locality and Breaking the Memory Bottleneck of Transformer on Time Series Forecasting (called DecoderTransformer in model_dict): Transformer XL: Porting Transformer XL for time series. Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting (Informer) DeepAR DSANet
AtsPy(GitHub:427)
AtsPy 代表Python 中的自動時間序列模型。該庫的目標(biāo)是預(yù)測單變量時間序列。
AtsPy的優(yōu)勢在于:
通過AutomatedModel(df),以統(tǒng)一的方式實現(xiàn)所有您喜歡的自動化時間序列模型。 通過使用LightGBM和TSFresh注入的功能,將結(jié)構(gòu)模型錯誤減少30%-50%。 使用奇異譜分析、周期圖和峰值分析自動識別數(shù)據(jù)中的周期性。 使用樣本內(nèi)驗證方法確定并提供適合時間序列的最佳模型。 將所有這些模型的預(yù)測結(jié)合在一個簡單(平均)和復(fù)雜(GBM)集合中,以提高性能。 已經(jīng)開發(fā)了適當(dāng)?shù)哪P?,以使用GPU資源來加速自動化過程。 可以使用am.models_dict_in處理樣本哪數(shù)據(jù)。使用am.models_dict_out用于樣本外預(yù)測。
目前涉及的模型有:
ARIMA - Automated ARIMA Modelling Prophet - Modeling Multiple Seasonality With Linear or Non-linear Growth HWAAS - Exponential Smoothing With Additive Trend and Additive Seasonality HWAMS - Exponential Smoothing with Additive Trend and Multiplicative Seasonality NBEATS - Neural basis expansion analysis (now fixed at 20 Epochs) Gluonts - RNN-based Model (now fixed at 20 Epochs) TATS - Seasonal and Trend no Box Cox TBAT - Trend and Box Cox TBATS1 - Trend, Seasonal (one), and Box Cox TBATP1 - TBATS1 but Seasonal Inference is Hardcoded by Periodicity TBATS2 - TBATS1 With Two Seasonal Periods
AutoTS(Github:451)
https://github.com/winedarksea/AutoTS
AutoTS是Python的一個時間序列包,旨在快速大規(guī)模部署高準(zhǔn)確的預(yù)測。AutoTS中的所有模型都支持預(yù)測多變量(多時間序列)輸出,也支持概率(上下屆)預(yù)測。大多數(shù)模型可以很容易地擴展到數(shù)十甚至數(shù)十萬個輸入序列。許多模型還支持傳入用戶定義的外生的回歸。

TSFresh Document https://github.com/blue-yonder/tsfresh/ https://github.com/winedarksea/AutoTS https://github.com/unit8co/darts https://github.com/facebookresearch/Kats https://github.com/alan-turing-institute/sktime https://www.sktime.org/en/stable/estimator_overview.html 時間序列預(yù)測的 7 種 Python 工具包,總有一款適合你! https://github.com/awslabs/gluon-ts https://github.com/Alro10/deep-learning-time-series https://github.com/timeseriesAI/tsai https://github.com/jdb78/pytorch-forecasting https://github.com/AIStream-Peelout/flow-forecast
往期精彩回顧
