作者:杰少
最新开源时间序列工具包
最新开源时间序列工具包
01
tsfresh(GitHub:6.3K+)
  • https://tsfresh.readthedocs.io/en/latest/
tsfresh是一个python包,它会自动计算大量的时间序列特征。此外,该软件包还包含评估此类特征对回归或分类任务的解释能力和重要性的方法。tsfresh可以自动提取特征构建特征。如下图所示,tsfresh可以自动从时间序列中提取100秒的特征。这些特征描述了时间序列的基本特征,如
  • 峰值数量;
  • 平均值或最大值;
  • 更复杂的特征,如时间反转对称性统计。
这些特征可以用来构建时间序列上的统计或机器学习模型,例如用于回归或分类任务。
02
Sktime(Github:5.2K+)
Sktime是Python中用于时间序列分析的库。它为多个时间序列学习任务提供了统一的界面。目前,这包括:
  • 时间序列分类、回归、聚类、预测等。
它配有时间序列算法和scikit learn兼容工具,用于构建、调整和验证时间序列模型。
目前Sktime包含了大量的时间序列模型,详见:https://www.sktime.org/en/stable/estimator_overview.html
03
儿Darts(GitHub:3.9K+)
  • https://github.com/unit8co/darts
Darts是一个Python库,要求Python 3.7及以上版本为佳,Darts包含非常多的模型,从经典的ARIMA到深度神经网络。
  • Darts中的模型可以以只饿极使用fit()和predict()函数,类似于scikit learn。
  • Darts可以方便地对模型进行回溯测试,组合多个模型的预测,并加入外部数据。
  • Darts支持单变量和多变量时间序列和模型。
04
Kats(Github:3.6K+)
  • https://github.com/facebookresearch/Kats
Kats是一个分析时间序列数据的工具包,是一个轻量级、易于使用而且具有非常好泛化能力的框架,用于执行时间序列分析。
Kats旨在为时间序列分析提供一站式服务,包括检测、预测、特征提取/嵌入、多元分析等05
05
GluonTS(Github2.6K+)
  • https://github.com/awslabs/gluon-ts
GluonTS是一个用于概率时间序列建模的Python软件包,专注于基于深度学习的模型。不过目前非常多的模型都是基于MXNET实现的
GluonTS的特点如下:
  1. 使用MXNet和PyTorch实现的最先进模型;
  2. 通过Amazon SageMaker轻松实现AWS集成;
  3. 用于加载和迭代时间序列数据集的实用程序;
  4. 用于评估模型性能并比较其准确性的实用程序;
  5. 用于定义自定义模型和快速实验的构建块
06
pytorch-forecasting(Github 1.9K+)
  • https://github.com/jdb78/pytorch-forecasting
pytorch Forecasting是一个基于pytorch的工具包,开发了很多最新的深度时间序列模型。它为pandas数据帧上的培训网络提供了一个高级API,并利用PyTorch Lightning在(多个)GPU、CPU上进行可扩展的培训,以及自动记录。
目前涉及的模型包括:
  • 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
07
tsai(Github:1.9K+)
  • https://github.com/timeseriesAI/tsai
tsai是在Pytorch&fastai基础上开发的开源深度学习软件包,专注于时间序列任务的最新技术,如分类、回归、预测等。
目前tsai仍然还在不断开发中,目前涵盖的模型包括:
  • 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)
08
Deep Learning Time Series(Github:1.6K+)
  • https://github.com/Alro10/deep-learning-time-series
深度学习应用于实践序列大论文,代码以及相关的实验等,不过目前该Git的更新已经不是非常频繁了
09
Flow Forecast(Github 950+)
  • https://github.com/AIStream-Peelout/flow-forecast
流量预测(FF)是一个针对时间序列预测框架的开源深度学习。它提供了所有最先进的模型(变形金刚、注意力模型、GRU)和前沿概念,以及易于理解的可解释性指标、云提供商集成和模型服务功能。Flow Forecast是第一个支持基于transformer的模型的时间序列框架,也是唯一一个真正的时间序列预测框架的端到端深度学习。目前,CoronaWhy的任务TS主要维护该存储库。欢迎拉取请求。历史上,该存储库为山洪暴发和河流流量预测提供了开源基准和代码。
目前涵盖的模型包括:
  • 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
10
AtsPy(GitHub:427)
AtsPy 代表Python 中的自动时间序列模型。该库的目标是预测单变量时间序列。
AtsPy的优势在于:
  • 通过AutomatedModel(df),以统一的方式实现所有您喜欢的自动化时间序列模型。
  • 通过使用LightGBM和TSFresh注入的功能,将结构模型错误减少30%-50%。
  • 使用奇异谱分析、周期图和峰值分析自动识别数据中的周期性。
  • 使用样本内验证方法确定并提供适合时间序列的最佳模型。
  • 将所有这些模型的预测结合在一个简单(平均)和复杂(GBM)集合中,以提高性能。
  • 已经开发了适当的模型,以使用GPU资源来加速自动化过程。
  • 可以使用am.models_dict_in处理样本哪数据。使用am.models_dict_out用于样本外预测。
目前涉及的模型有:
  • 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
11
AutoTS(Github:451)
  • https://github.com/winedarksea/AutoTS
AutoTS是Python的一个时间序列包,旨在快速大规模部署高准确的预测。AutoTS中的所有模型都支持预测多变量(多时间序列)输出,也支持概率(上下届)预测。大多数模型可以很容易地扩展到数十甚至数十万个输入序列。许多模型还支持传入用户定义的外生的回归。
参考文献
  1. TSFresh Document
  2. https://github.com/blue-yonder/tsfresh/
  3. https://github.com/winedarksea/AutoTS
  4. https://github.com/unit8co/darts
  5. https://github.com/facebookresearch/Kats
  6. https://github.com/alan-turing-institute/sktime
  7. https://www.sktime.org/en/stable/estimator_overview.html
  8. 时间序列预测的 7 种 Python 工具包,总有一款适合你!
  9. https://github.com/awslabs/gluon-ts
  10. https://github.com/Alro10/deep-learning-time-series
  11. https://github.com/timeseriesAI/tsai
  12. https://github.com/jdb78/pytorch-forecasting
  13. https://github.com/AIStream-Peelout/flow-forecast
继续阅读
阅读原文