Direct Epistemic Uncertainty Prediction (DEUP) for any scikit-learn model, with first-class time-series support.
Project description
deup
Direct Epistemic Uncertainty Prediction (DEUP) for any scikit-learn model — with first-class, leakage-correct time-series support.
DEUP estimates epistemic uncertainty by training a secondary error predictor on your model's out-of-sample errors — no ensembles, no Bayesian retraining, works with the model you already use. The method is due to Lahlou et al., 2023 (TMLR); this package is a maintained, installable, scikit-learn-compatible implementation of it.
Repository: https://github.com/ursinasanderink/deup · Docs: https://ursinasanderink.github.io/deup/
Quickstart
from sklearn.ensemble import RandomForestRegressor
from deup import DEUPRegressor
model = DEUPRegressor(base_model=RandomForestRegressor())
model.fit(X_train, y_train)
pred, unc = model.predict(X_test, return_uncertainty=True)
For time-series / cross-sectional data, pass a leakage-safe splitter:
from deup.splitters import PurgedWalkForward
model = DEUPRegressor(base_model=my_model, cv=PurgedWalkForward(embargo=5))
Install
pip install deup # core (numpy + scikit-learn)
pip install "deup[gbm]" # + LightGBM error predictor
pip install "deup[docs]" # + MkDocs site locally
Why this exists
The only public DEUP code is a 3-year-old research repo of notebooks; no maintained
pip-installable package existed until now. Major UQ libraries
(torch-uncertainty, uncertainty-toolbox, MAPIE) don't implement DEUP. deup
fills that gap with correct out-of-fold error construction for time-series /
cross-sectional data.
On California housing (v0.1 benchmark), DEUP uncertainty ranks test errors better than ensemble disagreement or a conformal residual baseline — see BENCHMARKS.md.
Status / roadmap
v0.1 (released): DEUPRegressor, OOF collector, splitters, full loss registry
(squared / Brier / pinball / rank), target transforms (log / asinh), benchmark, docs.
v0.2: DEUPClassifier / DEUPRanker, conformal intervals, aleatoric decomposition,
density/GP features, aggregation-reliability diagnostics.
Citing
If you use deup, please cite both this software (see CITATION.cff)
and the original DEUP paper (Lahlou et al., 2023).
License
Apache-2.0. See LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deup-0.1.1.tar.gz.
File metadata
- Download URL: deup-0.1.1.tar.gz
- Upload date:
- Size: 34.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17b363065aaab37d9e99c5b42cae5b1f5e8c7bedada15c96c31e76435936e916
|
|
| MD5 |
24634dcb8f17ef961d0db8e09201d009
|
|
| BLAKE2b-256 |
430bcffe6d17e4b0ab740a7376448b64c6c9b51219dbf8a6cb3a97e351061164
|
Provenance
The following attestation bundles were made for deup-0.1.1.tar.gz:
Publisher:
release.yml on ursinasanderink/deup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deup-0.1.1.tar.gz -
Subject digest:
17b363065aaab37d9e99c5b42cae5b1f5e8c7bedada15c96c31e76435936e916 - Sigstore transparency entry: 1726831467
- Sigstore integration time:
-
Permalink:
ursinasanderink/deup@bf5c300785c38c4114cb1b2d4e3b98d0eea37a3c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ursinasanderink
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bf5c300785c38c4114cb1b2d4e3b98d0eea37a3c -
Trigger Event:
push
-
Statement type:
File details
Details for the file deup-0.1.1-py3-none-any.whl.
File metadata
- Download URL: deup-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60d7f9dc84b84aff5552f226e0eae26bde8e03c05426ef97a0d8246ff9979ae6
|
|
| MD5 |
b4b6fb3703ca7e18019a791ebaa573ad
|
|
| BLAKE2b-256 |
6a7dac7cc023c9f5bbdedd9de8f9afa814c53a9da0f6d8939895b4ce44bbdf93
|
Provenance
The following attestation bundles were made for deup-0.1.1-py3-none-any.whl:
Publisher:
release.yml on ursinasanderink/deup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deup-0.1.1-py3-none-any.whl -
Subject digest:
60d7f9dc84b84aff5552f226e0eae26bde8e03c05426ef97a0d8246ff9979ae6 - Sigstore transparency entry: 1726831525
- Sigstore integration time:
-
Permalink:
ursinasanderink/deup@bf5c300785c38c4114cb1b2d4e3b98d0eea37a3c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ursinasanderink
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bf5c300785c38c4114cb1b2d4e3b98d0eea37a3c -
Trigger Event:
push
-
Statement type: