Skip to main content

Uncertainty Representation and Quantification for Machine Learning

Project description

probly: Uncertainty Representation and Quantification for Machine Learning

probly logo

PyPI version PyPI status PePy codecov Contributions Welcome License

🛠️ Install

probly is intended to work with Python 3.13 and above. Installation can be done via pip and or uv:

pip install probly
uv add probly

⭐ Quickstart

probly makes it very easy to make models uncertainty-aware and perform several downstream tasks:

import probly
import torch.nn.functional as F

net = ...  # get neural network
model = probly.method.dropout(net)  # make neural network a Dropout model
train(model)  # train model as usual

data = ...  # get data
data_ood = ...  # get out of distribution data
sampler = probly.representation.Sampler(model, num_samples=20)
sample = sampler.predict(data)  # predict an uncertainty representation
sample_ood = sampler.predict(data_ood)

eu = probly.quantification.classification.mutual_information(sample)  # quantify model's epistemic uncertainty
eu_ood = probly.quantification.classification.mutual_information(sample_ood)

auroc = probly.evaluation.tasks.out_of_distribution_detection(eu, eu_ood)  # evaluate model's uncertainty

📜 License

This project is licensed under the MIT License.


Built with ❤️ by the probly team.

Changelog

This changelog is updated with every release of probly.

Development

  • Added possiblity to create ensemble of torch models without resetting the weights of each model.
  • Refactored Efficient Credal Prediction calibration into the library via flexdispatch. Added a optimized PyTorch bisection solver (compute_efficient_credal_prediction_bounds) that reduces calibration time from days to minutes, while preserving the legacy SciPy implementation as a fallback for NumPy arrays.

0.1.0 (2024-03-14)

Initial pre-release of probly without functionalities.

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

probly-0.9.0.tar.gz (306.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

probly-0.9.0-py3-none-any.whl (477.6 kB view details)

Uploaded Python 3

File details

Details for the file probly-0.9.0.tar.gz.

File metadata

  • Download URL: probly-0.9.0.tar.gz
  • Upload date:
  • Size: 306.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for probly-0.9.0.tar.gz
Algorithm Hash digest
SHA256 9837de0363101cd872a4437380e21f21df785b75387f23952b3d1db14762f3eb
MD5 7cab120d9ed2449d4fc80a732801c6c0
BLAKE2b-256 fbd0b9e9f6a3e73c30b00527916a2d1bfe8b7e44ad5e26a46b112b321fab7161

See more details on using hashes here.

Provenance

The following attestation bundles were made for probly-0.9.0.tar.gz:

Publisher: publish-release.yml on pwhofman/probly

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file probly-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: probly-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 477.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for probly-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4466085f59124962fe25f03eef0c2005f92fb750c5f7c2e3678a000692256a8b
MD5 2e6487a51588a474719c16052fa53e75
BLAKE2b-256 5f73ab3e35935d9d7bc1d3c136e4bf335f269db88a945e044ab682df56ff24d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for probly-0.9.0-py3-none-any.whl:

Publisher: publish-release.yml on pwhofman/probly

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page