Enable classification models for regression tasks and provide uncertainty estimation
Project description
Binwise
Enable classification models for regression tasks and provide uncertainty estimation.
Introduction
Implementation of the binned uncertainty estimation ensemble method, as described in the paper "An Efficient Model-Agnostic Approach for Uncertainty Estimation in Data-Restricted Pedometric Applications" (Barkov et al., 2024).
Binwise serves as an adapter that allows you to apply classification algorithms to regression problems by discretizing the continuous target into bins. The approach not only enables the use of classification models for regression tasks but also can provide uncertainty estimates.
This approach is particularly useful in scenarios with limited training data, as demonstrated in applications like pedometrics and digital soil mapping.
Features
- Use classification algorithms with scikit-learn interface for regression tasks
- Obtain uncertainty estimates for regression predictions
Installation
pip install binwise
Quick Start
Simple example of how to use the binning adapter with TabPFN:
from tabpfn import TabPFNClassifier
from binwise import RegressionToClassificationEnsemble
tabpfn_ensemble = RegressionToClassificationEnsemble(
base_model_constructor=lambda: TabPFNClassifier(N_ensemble_configurations=1),
random_state=42,
)
tabpfn_ensemble.fit(X_train, y_train)
y_pred = tabpfn_ensemble.predict(X_test)
Examples
For more detailed examples, check out the following notebooks:
Regression Predictions: Using classification model (TabPFN) for regression task
Regression Predictions with Uncertainty Estimation: Obtaining uncertainty estimates along with predictions
Citation
If you use this code in your research, please cite:
@misc{barkov2024uncertainty,
title={An Efficient Model-Agnostic Approach for Uncertainty Estimation in Data-Restricted Pedometric Applications},
author={Viacheslav Barkov and Jonas Schmidinger and Robin Gebbers and Martin Atzmueller},
year={2024},
eprint={2409.11985},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2409.11985},
}
License:
This project is licensed under the AGPLv3 License - see the LICENSE.md file for details.
Project details
Release history Release notifications | RSS feed
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 binwise-0.2.0.tar.gz.
File metadata
- Download URL: binwise-0.2.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b5544d3a9ad5ec2818a9a72ffabb23cffe1b75eb4d6d3a67d842970bc1a1eee
|
|
| MD5 |
03348d4f1137f10f92a1a3c4ec6fe538
|
|
| BLAKE2b-256 |
5a76181bb377f4b141c82f2468f4e525d655f9d4db7be3d1c9c30864af33d91e
|
File details
Details for the file binwise-0.2.0-py3-none-any.whl.
File metadata
- Download URL: binwise-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
129e706ae9a49a3a4f5d4e1f3c84323c526f0000575161cff1356cdacefc79fc
|
|
| MD5 |
4aff8f51dab276cde4074fd3d80fdf62
|
|
| BLAKE2b-256 |
457fade3386a01c6272ab09684e019ac6c618b62781c74c5b09640d476ff0c83
|