Whittaker brings the full power of Generalized Additive Models (GAMs) to Python. It is built on NumPy and SciPy, follows the mathematical framework of Wood’s mgcv, and provides a formula-based interface that makes specifying even complex models a one-liner.
Installation
Whittaker targets Python 3.10+ and is not yet on PyPI. Once released:
Dependencies
The core package depends on:
| NumPy |
Array computation and linear algebra |
| SciPy |
Cholesky factorization, optimization, B-spline evaluation |
These are installed automatically.
From source
To install the development version from GitHub:
git clone https://github.com/rich-iannone/whittaker.git
cd whittaker
pip install -e ".[dev]"
The [dev] extra installs testing and linting tools (pytest, ruff, pyright).
Verifying the installation
After installing, check that Whittaker loads correctly and prints its version.
import whittaker as wk
# Print the installed version
print(wk.__version__)
0.1.dev390+g931406871.d20260812
If no error is raised and a version string appears, the installation is working.
What Whittaker provides
Whittaker includes a broad set of tools for modern statistical modeling:
- 14 response families including Gaussian, Poisson, Binomial, Gamma, Negative Binomial, Beta, Tweedie, Inverse Gaussian, Cox PH, and more
- 20+ smooth basis types including thin plate regression splines (TPRS), P-splines, cubic regression splines, tensor products, cyclic splines, random effects, soap film smooths, Gaussian processes, and Markov random fields
- Shape constraints: monotone increasing/decreasing, convex, and concave smooths
- Distributional regression (GAMLSS): model location, scale, and shape parameters simultaneously
- Quantile regression with non-crossing constraints
- Conformal prediction for distribution-free prediction intervals
- Causal inference via double/debiased machine learning
- Streaming/online fitting for data that arrives in batches
- Multi-response GAMs for jointly modeling multiple outcomes
- Functional regression for scalar-on-function models
- Large dataset support via BigGAM, PolarsGAM, and DuckDBGAM
- scikit-learn integration for use in ML pipelines
How this guide is organized
The user guide is grouped into sections that follow the modeling workflow.
Getting started
Fitting models
- Smooth terms: the full catalog of basis types and how to choose among them.
- Response families: Gaussian, Poisson, Binomial, and more.
- Model fitting: the P-IRLS algorithm, smoothness selection, and convergence.
- Data input: how Whittaker accepts dict-based data.
Prediction and inference
Model diagnostics
Model selection
Extended features
Large datasets
Bayesian inference
Advanced inference
Tooling
Deployment