Skip to content

popsregression

The Python implementation of the POPS (Pointwise Optimal Parameter Sets) algorithm. POPSRegression is a scikit-learn compatible estimator extending BayesianRidge with model misspecification uncertainty.

Method and theory — concepts, algorithm, tutorials, citation and the Julia implementation — are documented at pops-uq.github.io. These pages cover this package: installation, usage and the API reference.

Installation

pip install popsregression

Requires Python >= 3.9. Dependencies: scikit-learn>=1.6.1, scipy>=1.6.0, numpy>=1.20.0.

Quick start

from popsregression import POPSRegression

X_train, X_test, y_train, y_test = ...

# fit_intercept=False by default
model = POPSRegression()
model.fit(X_train, y_train)

# Combined misspecification + epistemic standard deviation
y_pred, y_std = model.predict(X_test, return_std=True)

Development

Source and issue tracker: github.com/POPS-UQ/popsregression.

pytest -vsl popsregression   # tests

pixi run test                # or, with pixi
pixi run lint
pixi run build-doc