Skip to main content

The Wise Time Series Library - Beautiful EDA, All Models, Plain-English Interpretation

Project description

TimeSage

The Wise Time Series Library

Beautiful EDA · All Models · Plain-English Interpretation

PyPI version Python versions License


TimeSage makes time series forecasting effortless. Go from raw data to a forecast with plain-English interpretation in just a few lines of Python.

Features

  • 3-Line Forecasting -- Load data, call forecast(), done. TimeSage handles model selection, feature engineering, and evaluation automatically.
  • Plain-English Interpretation -- Call result.interpret() and get a human-readable explanation of accuracy, error patterns, key drivers, and forecast direction.
  • Beautiful Plots -- Publication-ready visualizations with a custom Sage theme. Decomposition plots, forecast overlays, diagnostics, and more.
  • All Models, One API -- ARIMA, ETS, Theta, Random Forest, XGBoost, and LightGBM all share the same series.forecast(model="...") interface.
  • Smart EDA -- Automated exploratory data analysis with series.eda(): stationarity tests, seasonality detection, decomposition, and descriptive statistics.
  • Automatic Feature Engineering -- ML models get lag features, rolling statistics, and calendar features created automatically. No manual work required.

Installation

Basic (statistical models + Random Forest)

pip install timesage-ts

Full (adds XGBoost, LightGBM, Plotly)

pip install timesage-ts[full]

Optional extras

pip install timesage-ts[ml]           # XGBoost + LightGBM only
pip install timesage-ts[interactive]  # Plotly interactive charts

Requirements: Python 3.9+

Quick Start

import timesage as ts

# 1. Create a TimeSeries from your data
series = ts.TimeSeries(df, target="sales", time="date", freq="D")

# 2. Explore your data
series.eda()

# 3. Forecast the next 30 days (auto-selects the best model)
result = series.forecast(horizon=30)

# 4. Get a plain-English interpretation
result.interpret()

# 5. Plot the forecast
result.plot()

What interpret() prints

Forecast Interpretation
=======================
Overall accuracy : Excellent (MAPE = 3.2%)
Error consistency: Errors are uniform -- no major outlier spikes.
vs. Naive baseline: Model is 2.4x better than a naive repeat-last-value forecast.
Forecast trend  : Upward -- the series is predicted to increase over the horizon.

Available Models

Model Key Type Install
ARIMA (Auto) "arima" Statistical Core
ETS (Holt-Winters) "ets" Statistical Core
Theta "theta" Statistical Core
Random Forest "rf" Machine Learning Core
XGBoost "xgboost" Machine Learning pip install timesage-ts[ml]
LightGBM "lightgbm" Machine Learning pip install timesage-ts[ml]
Auto (best of all) "auto" Automatic Core

Use any model with the same interface:

result = series.forecast(horizon=30, model="arima")
result = series.forecast(horizon=30, model="xgboost")
result = series.forecast(horizon=30, model="auto")     # default

Comparing models

comparison = series.compare_models(test_size=0.2)

This runs every available model, evaluates each on a held-out test set, and returns a ranked DataFrame with MAE, RMSE, MAPE, and training time.

EDA in One Line

series.eda()

This runs:

  • Descriptive statistics (mean, std, min, max, skew, kurtosis)
  • Stationarity testing (Augmented Dickey-Fuller)
  • Seasonality detection (autocorrelation analysis)
  • Trend-seasonal decomposition
  • Distribution and time plot visualizations

Documentation

Full documentation is available in the docs/ folder:

Document Description
Getting Started Installation, first forecast, core workflow
User Guide Detailed tutorials and common workflows
Models Deep dive into every forecasting model
Features Feature engineering and data handling
Plotting Visualization guide and theme customization
Interpretation How plain-English interpretation works
API Reference Complete class and method reference
Examples Real-world use cases with full code
FAQ Frequently asked questions

Color Palette

TimeSage uses a carefully chosen color palette for all visualizations:

Color Hex Usage
#2E86AB Ocean Blue #2E86AB Primary -- forecasts, main series
#A23B72 Berry #A23B72 Secondary -- actuals, comparisons
#F18F01 Amber #F18F01 Accent -- confidence intervals, highlights
#2BA84A Sage Green #2BA84A Success -- good metrics, positive trends
#E63946 Coral Red #E63946 Danger -- warnings, poor metrics

Switch themes with:

import timesage as ts
ts.set_theme("sage")     # Default sage theme
ts.set_theme("dark")     # Dark mode
ts.set_theme("minimal")  # Clean minimal

License

MIT License. See LICENSE for details.

Author

Milan Amrut Joshi (mlnjsh@gmail.com)

GitHub: github.com/mlnjsh/timesage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timesage_ts-0.2.1.tar.gz (81.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timesage_ts-0.2.1-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

Details for the file timesage_ts-0.2.1.tar.gz.

File metadata

  • Download URL: timesage_ts-0.2.1.tar.gz
  • Upload date:
  • Size: 81.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for timesage_ts-0.2.1.tar.gz
Algorithm Hash digest
SHA256 32f1199e0c13176500b35cc078e7dc785b4224c4ddbb32618ad814ef77dda2fb
MD5 4c3ab78167dc39066549658811aaa221
BLAKE2b-256 9e727f3fc5eff229fe9cf9fe984a786fb141c67e278b106ace91003c5ac3a5ee

See more details on using hashes here.

File details

Details for the file timesage_ts-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: timesage_ts-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 36.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for timesage_ts-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d20fdab05c75f13a9739be328d8ad7ec006042883090eff6ed4cb176862493bd
MD5 25f03e90985c1d20c5fc77a072dabf0e
BLAKE2b-256 2739f66f9c0dd678ed4f080567ac60f5e216b6102c03566db9bfd5229c4e5aff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page