Python implementations of time series forecasting and anomaly detection
Nixtla
The best Python implementations for my time series methods are available from Nixtla. Here are some of their packages related to my work, all compatible with scikit-learn
.
- statsforecast: Automatic ARIMA and ETS forecasting (Hyndman et al., 2002; Hyndman & Khandakar, 2008).
- hierarchicalforecast: Hierarchical forecasting (Hyndman et al., 2011; Wickramasuriya et al., 2019).
- tsfeatures: Time series features (Kang et al., 2017; Montero-Manso et al., 2020; T. S. Talagala et al., 2018).
They have also produced a lot of other great time series tools that are fast (optimized using numba
) and perform well compared to various alternatives.
GluonTS
GluonTS from Amazon is excellent and provides lots of probabilistic time series forecasting models, with wrappers to some of my R code, and statsforecast from Nixtla. The other models in GluonTS are also well worth exploring.
Merlion
Merlion from Salesforce is another interesting python library which includes both my automatic ARIMA and automatic ETS algorithms, along with other forecasting methods. It also has some anomaly detection methods for time series.
pmdarima
The first attempt to port my auto.arima()
function to Python was pmdarima
.
sktime
sktime has the most complete set of time series methods for Python including
- AutoARIMA: (Hyndman & Khandakar, 2008);
- ETS: (Hyndman et al., 2002);
- BATS/TBATS: (De Livera et al., 2011);
- Theta: (Assimakopoulos & Nikolopoulos, 2000; Hyndman & Billah, 2003);
- STLForecaster: (Bandara et al., 2022);
- Croston: (Shenstone & Hyndman, 2005);
- Bagged-ETS: (Bergmeir et al., 2016);
and more. These are also compatible with scikit-learn
.
Recently, Kate Buchhorn has ported some of my anomaly detection algorithms to Python and made them available in sktime including:
- STRAY: High-dimensional anomaly detection (P. D. Talagala et al., 2021).
- DOBIN: Dimension reduction for anomaly detection (Kandanaarachchi & Hyndman, 2021).
statsmodels
The statsmodels collection includes a few functions based on my work:
pyhts
Bohan Zhang has produced pyhts, a re-implementation of the hts package in Python, based on Hyndman et al. (2011), Hyndman et al. (2016) and Wickramasuriya et al. (2019).
Darts
Darts is a Python library for wrangling and forecasting time series. It includes wrappers for ETS and ARIMA models from statsforecast
and pmdarima
, as well as an implementation of TBATS and some reconciliation functionality.