Splinator 📈
Probablistic Calibration with Regression Splines
scikit-learn compatible
Installation
pip install splinator
Algorithm
Supported models:
- Linear Spline Logistic Regression
Supported metrics:
- Spiegelhalter’s z statistic
- Expected Calibration Error (ECE)
[1] You can find more information in the Linear Spline Logistic Regression.
[2] Additional readings
- Zhang, Jian, and Yiming Yang. Probabilistic score estimation with piecewise logistic regression. Proceedings of the twenty-first international conference on Machine learning. 2004.
- Guo, Chuan, et al. "On calibration of modern neural networks." International conference on machine learning. PMLR, 2017.
Examples
| comparison | notebook |
|---|---|
| scikit-learn's sigmoid and isotonic regression | |
| pyGAM’s spline model |
Development
The dependencies are managed by uv.
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
uv sync --dev
# Run tests
uv run pytest tests -v
# Run type checking
uv run mypy src/splinator
Example Usage
from splinator.estimators import LinearSplineLogisticRegression
import numpy as np
# random synthetic dataset
n_samples = 100
rng = np.random.RandomState(0)
X = rng.normal(loc=100, size=(n_samples, 2))
y = np.random.randint(2, size=n_samples)
lslr = LinearSplineLogisticRegression(n_knots=10)
lslr.fit(X, y)
Metadata
Release files for splinator 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| splinator-0.3.0.tar.gz | 398.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| splinator-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 409.6 kB
Release files / splinator-0.3.0.tar.gz
| Download URL | splinator-0.3.0.tar.gz |
|---|---|
| Size | 398.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c0641b0d3279ef4ad696f3ef62d9d30c907d7cfb3d4b6b15ac246d997669d04
|
|
BLAKE2b-256 checksum How to use checksums |
e006352e3e3130e9136da7558f8092b40ded47e94d385695e0a9ba830a2261d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 1, 2026.
Transparency logRelease files / splinator-0.3.0-py3-none-any.whl
| Download URL | splinator-0.3.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc80c05981cc6d6e3f8f0ce8b61ae43a9b679e64a256624f2e2222552f9daeaf
|
|
BLAKE2b-256 checksum How to use checksums |
0a16c559c0e7a7e8c2e8bf73644358804b0be12a45c3fe6ed457658d019f1b7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 1, 2026.
Transparency log