Instance-Based Uncertainty Estimation for Gradient-Boosted Regression Trees
Project description
IBUG: Instance-Based Uncertainty Estimation for Gradient-Boosted Regression Trees
IBUG is a simple wrapper that extends any gradient-boosted regression trees (GBRT) model into a probabilistic estimator, and is compatible with all major GBRT frameworks including LightGBM, XGBoost, CatBoost, and SKLearn.
Install
pip install ibug
Quickstart
from ibug import IBUGWrapper
from xgboost import XGBRegressor
from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split
# load diabetes dataset
data = load_diabetes()
X, y = data['data'], data['target']
# create train/val/test split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.1, random_state=1)
X_train, X_val, y_train, y_val = train_test_split(X_train, y_train, test_size=0.1, random_state=1)
# train GBRT model
model = XGBRegressor().fit(X_train, y_train)
# extend GBRT model into a probabilistic estimator
prob_model = IBUGWrapper().fit(model, X_train, y_train, X_val=X_val, y_val=y_val)
# predict mean and variance for unseen instances
location, scale = prob_model.pred_dist(X_test)
# return k highest-affinity neighbors for more flexible posterior modeling
location, scale, train_idxs, train_vals = prob_model.pred_dist(X_test, return_kneighbors=True)
License
Reference
Brophy and Lowd. Instance-Based Uncertainty Estimation for Gradient-Boosted Regression Trees. arXiv 2022.
@article{brophy2021ibug,
title={Instance-Based Uncertainty Estimation for Gradient-Boosted Regression Trees},
author={Brophy, Jonathan and Lowd, Daniel},
journal={arXiv preprint arXiv:2205.11412},
year={2022},
}
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
Built Distributions
File details
Details for the file ibug-0.0.7.tar.gz
.
File metadata
- Download URL: ibug-0.0.7.tar.gz
- Upload date:
- Size: 288.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59ff3730fe53561aab5d99092ab8d857d1e70c8789af62c8459ccdc5cc3c38fc |
|
MD5 | 70609bcb9f2fbfed7c445ad0e5ed5d19 |
|
BLAKE2b-256 | 82ec04a491e0f1fd28223ee33f4ce8265d2062b45c4828f95bd03e790eb9bf5f |
File details
Details for the file ibug-0.0.7-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: ibug-0.0.7-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 448.1 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27c49cb28c02109dff4fa804329f426aa09ab715386b0b2a7ae2f19ca6ac7a45 |
|
MD5 | 1eb3c0caf3cb56aba1c9c9737a8cd3e2 |
|
BLAKE2b-256 | a51e19524046e47f2316741eb4f832d594fbc67c1644452772c2c8ab4fe2adc2 |
File details
Details for the file ibug-0.0.7-cp310-cp310-win32.whl
.
File metadata
- Download URL: ibug-0.0.7-cp310-cp310-win32.whl
- Upload date:
- Size: 428.0 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c538f01fb99596d5b6364a45159a98481c9bee5393d82c0763b0737013fc5fa |
|
MD5 | e70e378f277fd760007a70b4bae18e42 |
|
BLAKE2b-256 | 29887f265d8a415b0dc0605f911ebfa2e4b6ab90e62e7f1209949a8fcfd38a27 |
File details
Details for the file ibug-0.0.7-cp310-cp310-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: ibug-0.0.7-cp310-cp310-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 734e1e978b0cc3c4dc5cb1566958d0c736424d16e5d48b3cf6f5c8358f52f1ed |
|
MD5 | 2e610a13d7ba9e38e98da4054b3dab88 |
|
BLAKE2b-256 | f0e63d7abfc6c460e842cd1f9df8d158827dbbee5cd57ea2d3c957aa90812c6e |
File details
Details for the file ibug-0.0.7-cp310-cp310-musllinux_1_1_i686.whl
.
File metadata
- Download URL: ibug-0.0.7-cp310-cp310-musllinux_1_1_i686.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25ef06128d2095598cc56d96b859c3d3e096bebfb35540d0c5690521dac9c3fa |
|
MD5 | f7ee3ee9b3e63a19e37ffbddfb19f3fb |
|
BLAKE2b-256 | af8433ca298968c5e87cedf1a79bd96eedd677fec3d14c1d8e873edc4ee67df7 |
File details
Details for the file ibug-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ibug-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8499d3d37a77d3152df4471b7e1b22b66d7448b0007659e0c13cfeab7f914d84 |
|
MD5 | a4c0d925eb9a2d6e521d52832bc0c0cf |
|
BLAKE2b-256 | f446fce27bee5a1165dc2c0dc8314ae0b98ebcdf8335427b3ee34dde78468f50 |
File details
Details for the file ibug-0.0.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: ibug-0.0.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce2d75c02813361218f2d4bb752940f1c04cc670f1d394c54a2572406b1d04e9 |
|
MD5 | 903f2e240cdad4a7f1a5a6a76752bba1 |
|
BLAKE2b-256 | 9527d2dbf911836b986891a7187d90a0c292052b89af728c9641ce5c42eb1ccf |
File details
Details for the file ibug-0.0.7-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ibug-0.0.7-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 484.9 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 419aab98941b83e246965b0cc59e48933306f86f84afefa0e61d52999b6935b3 |
|
MD5 | 4e323fbfd3bae8c5cc60f30ae42859ce |
|
BLAKE2b-256 | 79055f3771bf7a304eb26784cce65ccf9991bfd1ead4bb4765c03a3f45945090 |
File details
Details for the file ibug-0.0.7-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: ibug-0.0.7-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 450.6 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e777dbae871c02c568f59fd7c1da811e0d012db659e609589de76bcaa329257 |
|
MD5 | 1101998a2cb22fc9887f98b944204911 |
|
BLAKE2b-256 | e48fc7f9c057a1fffc1c6b59ee60db95e343309c1c1b86fe16100fa856674f6d |
File details
Details for the file ibug-0.0.7-cp39-cp39-win32.whl
.
File metadata
- Download URL: ibug-0.0.7-cp39-cp39-win32.whl
- Upload date:
- Size: 429.2 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe3887c2439e79aa2eaf874cd9eee166626eb5d5b4db1d747591d7f8604f0142 |
|
MD5 | 0af099765058aaf11e09c0ebea2dbc34 |
|
BLAKE2b-256 | 3457c493e97c803efc65b1763691f6238e38df5471d87c2a777115964fc83fa5 |
File details
Details for the file ibug-0.0.7-cp39-cp39-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: ibug-0.0.7-cp39-cp39-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78e450160bdfcc600b3ad5a28657e905ac3211cff9fbab96888dac80441cb96c |
|
MD5 | 747023e5e2a6265fb2816bde9c195c83 |
|
BLAKE2b-256 | eeb0ed37d0f0a2931f22f8e7c610757b0452d01f818dc5fd81493c8dc9fdbb8c |
File details
Details for the file ibug-0.0.7-cp39-cp39-musllinux_1_1_i686.whl
.
File metadata
- Download URL: ibug-0.0.7-cp39-cp39-musllinux_1_1_i686.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 912067f2d40544aed8378a12f9c108c1d69894f825e297d6d9bc02f14e8ca495 |
|
MD5 | 7234555c0284855a66dce721a74ba70c |
|
BLAKE2b-256 | cb5c7d7e753444012ccbac93368120552ded394797bf977741d95e4d27edb68b |
File details
Details for the file ibug-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ibug-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18a864f5f6296354db63e4b51987e8523f453b5fd02f5c7d4390a50c4af7d256 |
|
MD5 | 8843731c5a05f44b55c342ac033736c5 |
|
BLAKE2b-256 | e3f6106b10bc5cbccfe8e18c0788f5588087a21ea3caffb9606883fc7cc5c4ac |
File details
Details for the file ibug-0.0.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: ibug-0.0.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d33475be1fdec49173b91fd2d509a745e4e8f1a30739cd17e8fcd678d5ca6aa8 |
|
MD5 | 04c10c7550d3fd9fd02dc35541f93cb5 |
|
BLAKE2b-256 | 894cb93841e6a02e8e5c5b176ee9956e431fcf80ee3f855155b5cd75311c9028 |
File details
Details for the file ibug-0.0.7-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: ibug-0.0.7-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 484.8 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 450fba962af9f8c2798bc33360d0b730c918cf3ff602572406f94b769039cf0c |
|
MD5 | be3f24afac93cdc59a71a90f5d0ddd1e |
|
BLAKE2b-256 | 39b90693aa590bd1e7ceb33e098ed8b2b9ad468502f8d050c222c5992b87a5c7 |