tbats
BATS and TBATS for time series forecasting
What it is and what it does
TBATS implements Bayesian Automatic Time Series forecasting methods designed to handle time series with multiple seasonal patterns and trend components. It combines exponential smoothing with automatic model selection, testing various configurations (including Box-Cox transformation and ARMA error modeling) to find the best fit. The package wraps numpy, scipy, scikit-learn, and pmdarima to perform this model search and fitting.
You provide a time series and optionally specify seasonal periods; TBATS fits a model, then forecasts forward. It exposes fitted values, residuals, model parameters, and summary statistics. The package is a Python port of the R forecast package's BATS/TBATS implementation. Fitting can be computationally intensive on long series, and the documentation includes troubleshooting guidance for slow convergence and multiprocessing issues.
Use it for:
- Forecast retail sales or demand with weekly and yearly seasonal cycles without manual model specification.
- Analyze electricity load or utility consumption with multiple overlapping seasonal patterns.
- Predict web traffic or system metrics that exhibit both daily and weekly seasonality.
- Generate point forecasts and residual diagnostics for time series with complex, non-standard seasonal structures.
- Prototype time series forecasting pipelines where automatic model selection is preferred over manual tuning.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements BATS and TBATS exponential smoothing methods for forecasting time series with complex seasonal patterns, built on numpy, scipy, scikit-learn, and pmdarima.
Yes, if you need BATS/TBATS forecasting and can tolerate an abandoned package. The library is stable, has low install friction, carries no known vulnerabilities, and is permissively licensed. However, the last release was 2023-04-17 with no active maintenance. Use it for prototyping or production work where you can accept no further updates; avoid it if you need ongoing support or compatibility with future dependency versions.
Install
tbats on PyPI
pip
pip install tbatsuv
uv add tbatspoetry
poetry add tbatsInstalling tbats
Before you install
Low friction: pure Python wheel with four well-established scientific dependencies. However, the package is abandoned—last release was 2023-04-17 and no commits since. No active maintenance or security updates.
License in practice
MIT License (permissive): you can use, modify, and distribute this package freely with minimal restrictions, though you must retain the license notice.
Quickstart
pip install tbats
from tbats import TBATS
import numpy as np
if __name__ == '__main__':
y = np.array([...]) # your time series
estimator = TBATS(seasonal_periods=[14, 30.5])
fitted_model = estimator.fit(y)
forecast = fitted_model.forecast(steps=14)
On Windows, fitting requires wrapping code in `if __name__ == '__main__':` due to multiprocessing behavior. Fitting can be slow on long time series; consider disabling Box-Cox transformation and ARMA errors or setting n_jobs=1 if parallelization freezes.
Verify before relying
- Whether the package remains compatible with current versions of numpy, scipy, scikit-learn, and pmdarima given the days since last release.
- Whether the R forecast package equivalence (stated in docs) is maintained across recent updates to the R implementation.
Package facts
| License | MIT License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — numpy, scipy, pmdarima, scikit-learn |
| Maintenance | abandoned — 1,215 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 710,553/month — #5,259 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tbats-1.1.3-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
prophetProphet forecasts time series data using an…
permissive · top 5,000 on PyPI
statsforecastStatsForecast provides fast implementations of…
permissive · top 5,000 on PyPI
pmdarimaPmdarima provides automated ARIMA time series…
permissive · top 5,000 on PyPI
hierarchicalforecastReconciles hierarchical time-series forecasts…
permissive · top 15,000 on PyPI
cartoboostCartoBoost is a Rust-backed gradient boosting…
permissive · top 15,000 on PyPI
neuralprophetNeuralProphet is a PyTorch-based framework for…
permissive · top 15,000 on PyPI
pytorch-forecastingPyTorch Forecasting provides neural network…
permissive · top 15,000 on PyPI
chronos-forecastingChronos provides pretrained transformer-based…
permissive · top 15,000 on PyPI
coreforecastProvides fast C++ implementations of…
permissive · top 5,000 on PyPI
simdkalmanImplements vectorized Kalman filters that run…
permissive · top 15,000 on PyPI