Metadata-Version: 2.4
Name: probly
Version: 0.9.0
Summary: Uncertainty Representation and Quantification for Machine Learning
Author: Timo Löhr, Maximilian Muschalik, Clemens Damke, Alireza Javanmardi
Author-email: Paul Hofman <paul.hofman@ifi.lmu.de>
License-Expression: MIT
Project-URL: documentation, https://pwhofman.github.io/probly
Project-URL: source, https://github.com/pwhofman/probly
Project-URL: tracker, https://github.com/pwhofman/probly/issues
Project-URL: changelog, https://github.com/pwhofman/probly/blob/main/CHANGELOG.md
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.15,>=3.13.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: scipy>=1.14.1
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: mpltern>=0.6.0
Requires-Dist: numpy>=2.1.0
Requires-Dist: tqdm>=4.25.0
Requires-Dist: joblib>=1.1.0
Dynamic: license-file

# probly: Uncertainty Representation and Quantification for Machine Learning
<div align="center">
<picture>
  <source srcset="docs/source/_static/logo/logo_dark.png" media="(prefers-color-scheme: dark)">
  <source srcset="docs/source/_static/logo/logo_light.png" media="(prefers-color-scheme: light)">
  <img src="docs/source/_static/logo/logo_light.png" alt="probly logo" width="300" />
</picture>

[![PyPI version](https://badge.fury.io/py/probly.svg)](https://badge.fury.io/py/probly)
[![PyPI status](https://img.shields.io/pypi/status/probly.svg?color=blue)](https://pypi.org/project/probly)
[![PePy](https://static.pepy.tech/badge/probly?style=flat-square)](https://pepy.tech/project/probly)
[![codecov](https://codecov.io/gh/pwhofman/probly/branch/main/graph/badge.svg)](https://codecov.io/gh/pwhofman/probly)
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen)](.github/CONTRIBUTING.md)
[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
</div>

## 🛠️ Install
`probly` is intended to work with **Python 3.13 and above**. Installation can be done via `pip` and
or `uv`:

```sh
pip install probly
```

```sh
uv add probly
```

## ⭐ Quickstart

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

```python
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](https://github.com/pwhofman/probly/blob/main/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.
