Registry / analytics / gamfit

gamfit

JSON →
library0.1.176pypypiunverified

Formula-first generalized additive models (GAMs) with a high-performance Rust core. Version 0.1.176, actively developed (GitHub).

pip install gamfit
INSTALL
IMPORT
SIG · GAMFIT
G
gamfit
analyticspythonv0.1.176
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GAM
from gamfit import GAM
from gamfit.gam import GAM
Top-level import is from gamfit, not submodule.
s
from gamfit import s
from gamfit.smooth import s
smooth term function is exported at top level.
te
from gamfit import te
Tensor product smooth term.

Fit a simple GAM with smooth term.

import numpy as np from gamfit import GAM, s np.random.seed(42) n = 200 x = np.linspace(0, 10, n) y = np.sin(x) + np.random.normal(0, 0.2, n) model = GAM(y ~ s(x)) model.fit() print(model.summary())
Debug
Known issues
breakingAPI changes are frequent in early versions (0.x). Always pin version in requirements.
fix
Use gamfit>=0.1.176,<1.0.0 and test upgrades.
affects: <1.0.0
deprecatedOld import paths like `from gamfit import GAM` (top-level) are correct; avoid `from gamfit.models import GAM`.
fix
Use `from gamfit import GAM`.
affects: 0.1.x
gotchaFormula syntax uses `~` and expects columns as symbols. Do not quote column names.
fix
Use `y ~ s(x)`, not `y ~ 's(x)'`.
affects: all
gotchaMissing or inconsistent data types can cause silent errors. Input arrays should be float64.
fix
Cast data to `np.float64` if needed.
affects: all
Upgrade
Version history
0.1.176latest on PyPI · released Jun 7, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
26
OpenAI (training)
1
Resources
gamfit — pip install gamfit · libregistry