Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

pwhofman/probly

Repository files navigation

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.12 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.transformation.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.

About

Uncertainty Representation and Quantification for Machine Learning 🤔

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 18