Nixtla unveiled Stats Forecast 1.7.5, a major update that brings new features and improvements that further solidify its position as the leading tool for univariate time series forecasting. This release introduces the innovative MFLES model and a convenient wrapper for scikit-learn models, allowing users to easily leverage exogenous features.
One of the notable features of this version is the addition of MFLES (Median Fourier Linear Exponential Smoothing) model, contributed by Tyler Blume. This model stands out for its excellent performance, speed and versatility, supporting exogenous characteristics and handling multiple seasons with aplomb. The MFLES model is based on gradient-driven time series decomposition, integrating traditional decomposition techniques as a base estimator in the boosting process. Its name is derived from the underlying estimators: median, Fourier terms, linear trends, and exponential smoothing. This combination allows the MFLES model to deliver robust and accurate forecasts, making it a valuable addition to the StatsForecast arsenal.
The new version also includes a wrapper for scikit-learn models, allowing users to use scikit-learn's rich feature engineering capabilities in their time series forecasting tasks. The `statsforecast.models.SklearnModel` wrapper allows you to train one model per run, which can be more effective than a single global model in certain scenarios. This integration offers flexibility and enhances the modeling power of StatsForecast, making it easier to incorporate external variables such as weather or prices into forecast models.
StatsForecast Addresses Limitations of Existing Python Alternatives for statistical models, which are often slow, inaccurate, and non-scalable. Designed for high performance and scalability, StatsForecast can efficiently scale to millions of time series, making it suitable for production environments and benchmarking purposes.
Key features and performance of StatsForecast 1.7.5 include:
Automatic forecast: StatsForecast includes automated tools such as AutoARIMA, AutoETS, AutoCES and AutoTheta, which find the best parameters and models for a group of time series. These tools are optimized for performance, ensuring fast and accurate results.
Variety of models: From the ARIMA and Theta families to seasonal multiple models and GARCH/ARCH models, StatsForecast covers a wide range of forecasting needs.
Speed and efficiency: The library is 20x faster than pmdarima, 1.5x faster than R, and significantly faster than other popular tools like Prophet and statsmodels. By using numba to compile high-performance machine code, StatsForecast sets a new standard for speed and efficiency.
Compatibility and integration: Out-of-the-box support for Spark, Dask, and Ray enables seamless integration across multiple data processing pipelines. The library also supports probabilistic forecasting, confidence intervals, anomaly detection, and exogenous variables.
Easy to use syntax: With a familiar syntax similar to that of sklearn, StatsForecast offers an intuitive interface for fitting and predicting time series models, making it accessible to users of all levels.
Installing StatsForecast is simple. It can be installed using pip or conda:
pip install statsforecast
conda install -c conda-forge statsforecast
For a quick start, the following example demonstrates tuning and prediction with the AutoARIMA model:
from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA
from statsforecast.utils import AirPassengersDF
df = AirPassengersDF
sf = StatsForecast(models=(AutoARIMA(season_length=12)), freq='M')
sf.fit(df)
sf.predict(h=12, level=(95))
StarForecast Examples and Guides:
- End to End Tutorial: Training, evaluation and selection of models for multiple time series.
- Anomaly detection: Detect anomalies in time series using in-sample prediction intervals.
- Cross validation: Robust evaluation of model performance.
- Multiple seasonalities: Forecast data with seasonal multiples using an MSTL.
- Predict demand peaks: Electrical load forecasting to detect daily peaks and reduce the electricity bill.
- Intermittent demand: Forecast series with very few non-zero observations.
- Exogenous regressors: Use external variables such as weather or prices in forecast models.
In conclusion, StatsForecast 1.7.5 is a game-changer for univariate time series forecasting, offering speed, accuracy, and flexibility. Adding the MFLES model and scikit-learn integration expands the tool's capabilities, making it an indispensable resource for data scientists and analysts. Whether you need to forecast demand spikes, detect anomalies, or handle seasonal multiples, StatsForecast provides the necessary tools and performance.
Asif Razzaq is the CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, Asif is committed to harnessing the potential of artificial intelligence for social good. His most recent endeavor is the launch of an ai media platform, Marktechpost, which stands out for its in-depth coverage of machine learning and deep learning news that is technically sound and easily understandable to a wide audience. The platform has more than 2 million monthly visits, which illustrates its popularity among the public.