Evaluate predictive multiplicity
Project description
multiplicity
Library for evaluating predictive multiplicity of deep leearning models.
Setup
pip install multiplicity
Quickstart
The library provides a method to estimate a viable prediction range ---the minimum and maximum possible predictions--- within the Rashomon set ---a set of models that have epsilon-similar loss on some reference dataset.
import multiplicity
# Train binary classifier with torch.
x = ...
train_loader = ...
model = ...
model(x) # e.g., 0.75
# Specify how similar is the loss for models in the Rashomon set.
epsilon = 0.01
# Specify the loss function that defines the Rashomon set.
stopping_criterion = multiplicity.ZeroOneLossStoppingCriterion(train_loader)
# Compute viable prediction range.
lb, pred, ub = multiplicity.viable_prediction_range(
model=model,
target_example=x,
stopping_criterion=stopping_criterion,
criterion_thresholds=epsilon,
)
# e.g., lb=0.71, pred=0.75, ub=0.88
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
multiplicity-1.0.0.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file multiplicity-1.0.0.tar.gz
.
File metadata
- Download URL: multiplicity-1.0.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-21-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f31142e2a579080d04b5a7dd3c9cde21b370ecf5447d3e03624ffbc9c7a6ebb |
|
MD5 | 43222ef632ad746c17bcb798d7637efc |
|
BLAKE2b-256 | 0bd3dd0d27b7143a0cab6179e11a52382dee6cacd7ac939d47b2c2ce052a4ae9 |
File details
Details for the file multiplicity-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: multiplicity-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-21-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5580f893ded96e0b0c97cd049b0570d29018ef83ea33e56c0dd056bc7b884dd |
|
MD5 | 684b1931a25cc6d0be9b6bc011f3691b |
|
BLAKE2b-256 | ba1efcd60426d4fec765aaa022c58a01c0b96505706d81d44bcb0ad9ce7ec701 |