Enable classification models for regression tasks and provide uncertainty estimation.
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.
- Use classification algorithms with scikit-learn interface for regression tasks
- Obtain uncertainty estimates for regression predictions
pip install binwise
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)
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
If you use this code in your research, please cite:
@inproceedings{barkov2024uncertainty,
author = {Barkov, Viacheslav and Schmidinger, Jonas and Gebbers, Robin and Atzmueller, Martin},
booktitle = {2024 International Conference on Machine Learning and Applications (ICMLA)},
title = {An Efficient Model-Agnostic Approach for Uncertainty Estimation in Data-Restricted Pedometric Applications},
year = {2024},
pages = {198-205},
doi = {10.1109/ICMLA61862.2024.00033}
}
This project is licensed under the AGPLv3 License - see the LICENSE.md file for details.