Tutorial Gallery#
Browse all 16 Twiga tutorials organised by topic and difficulty. Click any card to open the notebook.
Getting Started
Load data, configure the forecaster, and run your first prediction.
Forecastability Analysis
Measure signal strength before modelling - entropy, Hurst, autocorrelation.
Feature Engineering
Calendar features, lag transforms, Fourier encoding, and scaling.
ML Point Forecasting
LightGBM, XGBoost, and CatBoost for point forecasts.
Backtesting & Evaluation
Time-based cross-validation, RMSE/MAE/MASE, and walk-forward testing.
Baseline Benchmarking
Naive, seasonal naive, window average, and drift baselines - establish a performance floor and compute skill scores.
Neural Network Models
MLPF, MLPGAM, N-HiTS, and GANF architectures with PyTorch Lightning.
Quantile Regression
Pinball loss, prediction intervals, QR and FPQR distribution heads.
Parametric Distributions
Normal, Gamma, Beta, LogNormal heads - choosing the right distribution.
Conformal Prediction
Coverage-guaranteed intervals on any model with CQR and CRC methods.
Hyperparameter Tuning
Optuna integration, search spaces, resumable SQLite studies.
Ensemble Strategies
Mean, median, and weighted ensemble over multiple models.
Custom Models
Plug in your own model by implementing the Twiga model interface.
Time-Series Differencing
First-difference and seasonal differencing to handle non-stationary series.
Typed Forecast Results
Auto-dims, distribution= shorthand, and ForecastResult typed API.
SHAP Feature Attribution
TreeExplainer for LightGBM/XGBoost/CatBoost - rank features and visualise lookback-window importance.