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.7.tar.gz (91.8 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.7-py3-none-any.whl (47.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timesage_ts-0.2.7.tar.gz
  • Upload date:
  • Size: 91.8 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.7.tar.gz
Algorithm Hash digest
SHA256 cfdf7e185e7aa484cde7db11a2be39a1f5bd686e3f748c5433dd392d3906da45
MD5 6b44b8bd75c4d2bb0aec502b0568e7ef
BLAKE2b-256 175e28b617fbae9a975395c62f4c5da2eaf7d77679cce7caedc0bf1ce00ab2a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: timesage_ts-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 47.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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bb0f8d13854871cc583c9e43415576f07ea2055a0fedf7138fae0814c8d79906
MD5 0091ef463dcbaa92eac4b751fc9e6f6f
BLAKE2b-256 e40c26246d423f56b975e947103fac70c32a4170b3855745d14acfc668317021

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