Auto BATS
- Multiplicative patterns when seasonal swings grow with the level
- Complex seasonality through flexible Fourier-based seasonal modeling
- Non-normal data by applying automatic transformations for skewed distributions
Supported seasonal periods
This table shows the supported seasonal periods:
| Data Frequency | Period | Use Case |
|---|---|---|
| Daily | 7 | Weekly patterns |
| Quarterly | 4 | Yearly cycle |
| Monthly | 12 | Yearly cycle |
| Weekly | 52 | Yearly cycle |
How it works
- Box-Cox Transformation
Automatically selects transformation to stabilize variance:
- λ = 0: Log transform (multiplicative)
- λ = 0.5: Square root (intermediate)
- λ = 1: No transform (additive)
- Fourier Seasonality
Models seasonal patterns using trigonometric terms:
seasonal(t) = Σ[a_k·sin(2πkt/m) + b_k·cos(2πkt/m)]Where:
m = seasonal period
k = number of harmonics
- Trend + Seasonal Forecast
forecast(h) = level + trend·h + seasonal(h)Then, the inverse Box-Cox transformation is applied.
Performance
- Speed: Sub-millisecond for typical datasets (20–50 points)
- Validation: 11,700–119,000x faster than Python's tbats library
- Accuracy: Usually within 4–8% of Python implementation. In complex seasonality edge cases, accuracy is up to 17% of the Python implementation.
Key Properties
This table shows the key properties and their descriptions:
| Property | Description |
|---|---|
ModelOrder |
Model description. For example, "BATS(0.0, {12})" |
BoxCoxLambda |
Transformation parameter (0=log, 1=none) |
ModelError |
Root mean squared error |
LastWarning |
Data quality or fitting warnings |
Optimized defaults and limitations
- Single seasonality only. Daily, weekly, and yearly seasonality are not supported
simultaneously.
This limitation is acceptable because typical patterns are yearly or quarterly for industries such as Manufacturing, Retail, Foods, Distribution, Wholesale, and Fashion. Examples where multi-seasonality is desirable include hotel booking, utilities (water and electrical), delivery, and healthcare.
- No prediction intervals.
This limitation is acceptable because DMP is used for demand planning, where point forecasts drive MRP/ inventory calculations.
- Fixed Fourier terms per period.
Optimized for industries using M3 and MRP.
- ARMA errors are not implemented.
For monthly and weekly demand planning with strong seasonality, shorter horizons, or limited history, ARMA provides minimal benefit and increases complexity, making the solution less robust.
Possible warnings returned in the LastWarning property
- Summary:
- Data quality warnings (missing values and outliers) come from SetData.
- Model fitting warnings (insufficient data, constant data, and fit failure) come from AutoFitWithFallback.
- Warnings are cumulative. Data warnings are preserved and prepended to fitting warnings.
- This table shows warnings from SetData and CleanData:
Warning Description Interpolated X missing values. This warning occurs when missing data points are filled. Replaced X outliers. This warning occurs when outliers are capped. Interpolated X missing values. Replaced X outliers. This warning occurs when both operations are performed. - This table shows warnings from AutoFitWithFallback:
Warning Description WARNING: Insufficient data (need X). Using naive forecast. This warning occurs when there is not enough data for a seasonal model. WARNING: Constant data. Using mean forecast. This warning occurs when all data values are the same. WARNING: AutoFit failed. Using simple exponential smoothing. This warning occurs when a model fitting error happens. - Combined warnings. Any data-cleaning warning can be prepended to fallback warnings, for
example:
- Interpolated 3 missing values. WARNING: Insufficient data (need 24). Using naive forecast.
- Replaced 2 outliers. WARNING: Constant data. Using mean forecast.