Omnicast
Automatic statistical forecasting for Python with one consistent, interval-aware API -- fit, backtest, and plot every model the same way.
Status: v0.1 alpha (renamed from
auto-time-series). The API is usable, but model coverage and R parity fixtures are still growing.
Install
pip install omnicast
For local development:
uv sync --extra dev
Full docs with a worked example for every model live under docs/;
build them locally with:
uv sync --extra docs
uv run sphinx-build -b html docs docs/_build/html
LSTMForecaster requires PyTorch, kept out of the base install:
pip install omnicast[torch]
# or, for development:
uv sync --extra dev --extra torch
Quick start
import pandas as pd
from omnicast import AutoForecaster
y = pd.Series(
[112, 118, 121, 130, 128, 137, 143, 149, 154, 162, 169, 175],
index=pd.period_range("2025-01", periods=12, freq="M"),
)
model = AutoForecaster(
seasonal_period=None,
metric="rmse",
validation_horizon=1,
).fit(y)
forecast = model.predict(horizon=6, level=[80, 95])
print(model.leaderboard_)
print(forecast.to_frame())
Every fitted estimator exposes fitted_values_, residuals_, sigma2_, and prediction_intervals_. Statistical estimators also expose params_, parameter_confidence_intervals_ (95%), aic_, and bic_. Prediction intervals are returned on each prediction because they depend on horizon and requested coverage.
Models
| Estimator | Purpose | Intervals |
|---|---|---|
NaiveForecaster |
Random walk | Horizon-scaled Gaussian innovation |
SeasonalNaiveForecaster |
Seasonal random walk | Cycle-scaled Gaussian innovation |
MeanForecaster |
Historical mean | Mean forecast uncertainty |
DriftForecaster |
Random walk with drift | Drift forecast uncertainty |
ThetaForecaster |
Theta method (port of R forecast::thetaf) |
Random-walk innovation scaling |
ETSForecaster |
Error/trend/seasonal state space | State-space forecast uncertainty |
ARIMAForecaster |
ARIMA/SARIMA, optional regressors | State-space forecast uncertainty |
AutoARIMAForecaster |
AICc grid-selected ARIMA | State-space forecast uncertainty |
LSTMForecaster |
Autoregressive LSTM (torch, optional) |
Random-walk innovation scaling |
AutoForecaster |
Rolling-origin model selection | Selected model's intervals |
Evaluation
from omnicast import NaiveForecaster, backtest
folds = backtest(NaiveForecaster(), y, horizon=3, initial=6, metric="rmse")
print(folds)
Available metrics are MAE, RMSE, MAPE, and sMAPE. Backtesting uses expanding windows and never trains on future observations.
Design and scope
The package follows pandas index semantics and the familiar fit/predict estimator pattern. Learned state uses trailing underscores. Models validate input rather than silently imputing data or guessing an irregular date frequency.
This codebase is a Python implementation foundation, not a blanket claim of parity with R forecasting packages. Each future port must record its algorithm source, licensing, deviations, and numerical parity tests. See CONTRIBUTING.md.
ThetaForecaster is the first R port: a compatible pure-Python reimplementation of forecast::thetaf's classical Theta method, described in its own docstring along with the exact deviations from R's output (approximate intervals, no numerical parity fixtures yet).
LSTMForecaster is the first wrapper around a Python deep-learning module (torch, optional dependency), following the same BaseForecaster interface as the statsmodels-backed models. It is not part of AutoForecaster's default candidate list -- pass it explicitly via AutoForecaster(models=[...]) -- since it is optional-dependency and materially slower to backtest.
Licensed under Apache-2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omnicast-0.1.1.tar.gz.
File metadata
- Download URL: omnicast-0.1.1.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ce05936b764f4a2cd546e7fa7f0ac2ed17883cf1a802cc46ff5c5ee726f82e7
|
|
| MD5 |
b4ea32ce04eb53588ed63c0d8b28affd
|
|
| BLAKE2b-256 |
2c344ca85507f7859201ed72bd8bd3b9a8323aa3a0d1d2f061074550373dcc4b
|
File details
Details for the file omnicast-0.1.1-py3-none-any.whl.
File metadata
- Download URL: omnicast-0.1.1-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1a76d430cee5f9da49d48a1cbb07fd57214e2af68f38cafc19be373167ae5be
|
|
| MD5 |
edf8b6a9b0fce44e11e64b8fac5fafbe
|
|
| BLAKE2b-256 |
f5fa52a5b3cf679439292c617e4b7660b6ecedf678351617ddeedeaccd8dfd05
|