Skip to main content

Instance-Based Uncertainty Estimation for Gradient-Boosted Regression Trees

Project description

IBUG: Instance-Based Uncertainty Estimation for Gradient-Boosted Regression Trees

PyPi version Python version Github License Build

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.

thumbnail

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

Apache License 2.0.

Reference

Brophy and Lowd. Instance-Based Uncertainty Estimation for Gradient-Boosted Regression Trees. NeurIPS 2022.

@inproceedings{brophy2022ibug,
  title={Instance-Based Uncertainty Estimation for Gradient-Boosted Regression Trees},
  author={Brophy, Jonathan and Lowd, Daniel},
  booktitle={International Conference on Neural Information Processing Systems},
  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

ibug-0.0.11.tar.gz (369.0 kB view details)

Uploaded Source

Built Distributions

ibug-0.0.11-cp310-cp310-win_amd64.whl (563.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

ibug-0.0.11-cp310-cp310-win32.whl (534.4 kB view details)

Uploaded CPython 3.10 Windows x86

ibug-0.0.11-cp310-cp310-musllinux_1_1_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

ibug-0.0.11-cp310-cp310-musllinux_1_1_i686.whl (1.5 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

ibug-0.0.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

ibug-0.0.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

ibug-0.0.11-cp310-cp310-macosx_10_9_x86_64.whl (596.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

ibug-0.0.11-cp39-cp39-win_amd64.whl (565.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

ibug-0.0.11-cp39-cp39-win32.whl (535.5 kB view details)

Uploaded CPython 3.9 Windows x86

ibug-0.0.11-cp39-cp39-musllinux_1_1_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

ibug-0.0.11-cp39-cp39-musllinux_1_1_i686.whl (1.5 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

ibug-0.0.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

ibug-0.0.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

ibug-0.0.11-cp39-cp39-macosx_10_9_x86_64.whl (598.2 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

Details for the file ibug-0.0.11.tar.gz.

File metadata

  • Download URL: ibug-0.0.11.tar.gz
  • Upload date:
  • Size: 369.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for ibug-0.0.11.tar.gz
Algorithm Hash digest
SHA256 275c02cfe64dc39c629e9a494397ec50e8d802b11ec246c08891ab8819803a65
MD5 8b97acf49d59d1261a2a4567488a281d
BLAKE2b-256 5a6d4aa8f60b7349ed85429b4b6426db42d7d2537f583f8fedb8f5b27eab0429

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: ibug-0.0.11-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 563.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for ibug-0.0.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fbc5efd95d8b5e78fc2be8da67fb698401aedd72338aa19c27961d762a57483a
MD5 2fb4477da5dbdcbf22ac3ae568e7c68a
BLAKE2b-256 33f6a5ec484f15d7ba8070464aeaa657b42e0cb49e48fc1e721e5632823298f0

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp310-cp310-win32.whl.

File metadata

  • Download URL: ibug-0.0.11-cp310-cp310-win32.whl
  • Upload date:
  • Size: 534.4 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for ibug-0.0.11-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 9da7602cea74b377fde4f34795e015cae7e8b56bcd2db76ad8e98dfab7c86293
MD5 d1a3521a0ce1a3bf282eb721e190caf7
BLAKE2b-256 e5fa72b214fa457bc4071ce86a26efbdb302ca3a8d92a53e5162263e467d62f3

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 d90b43c2736325ebc4d8f63f14cd3d2684f43fc71267ea185b6559e6283520d0
MD5 9bcf982cda53162a0ae1ab88a771e6c7
BLAKE2b-256 a9f7346b7154b250739ef4ee62896cbc008831fd076fb47c24304f259867f124

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp310-cp310-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 ab445e4082516cc3a85d3e76eaa5871f96cf7fb11646a54717bb3aa6904988bc
MD5 5c019e138dea1693fd8448f66e08d8ac
BLAKE2b-256 184931db80da1bb7e7f90c851585f664dbcc5e78b01dd9cffa1e51d7cbc78356

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 16c30f120400bf0d74e20ba910ba038658d6dc74e02966da1954dc55fa02a8b5
MD5 f1e7de928ff5360677cdb81a31663d68
BLAKE2b-256 9c9e3c8f823f2d0fee58a9011ca1d89e2783fa89e0cdd14563cbafa11e000d20

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 aebda705b225502af185ced51c226c6fb3385356157689bd3a495d1b6566d067
MD5 5a9fd9048d49331f8ff11a004777383b
BLAKE2b-256 03eae92281211ddd31a5faa4e4646b0e12b2496294fc5256c9230074e2e8a78b

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 212d44dfe0fe84fa7d1822a5749efc473bdd93e003e5e4625d7a38d4a45bf977
MD5 d1751e4329f50eafec750e715ce4947e
BLAKE2b-256 fab596d43cdbc60435219204c6f47053601973270c9efa2c04372262d292ea0d

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: ibug-0.0.11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 565.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for ibug-0.0.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3807ec403e244bd4ad0dedbd13e3110f7b36539b10b2131bf1a32beac5a2908b
MD5 669fbed52c41fe5a8a31dc83ef55ff5c
BLAKE2b-256 d47c077d0861c80088ec55c596e333cef2555b09b003bd0a84d9a159fa9b45e0

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp39-cp39-win32.whl.

File metadata

  • Download URL: ibug-0.0.11-cp39-cp39-win32.whl
  • Upload date:
  • Size: 535.5 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for ibug-0.0.11-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 1715827e798fdd0fd9006aa573cc3ac9cfb7e29a45477692e6aa05b0564d608c
MD5 d663481e8d57bec2cd3b0aa7e50377bb
BLAKE2b-256 cb4080daca105f7fd27bf2e43ef3059ab1b8ecc75765546bfe446d5f17087fd6

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c3fb0963c8fbe4f0d68006d3661488742f6a1f2377cb4385a774f050e6e6d8c7
MD5 de1b848dad761fa280466ffb608bbd9f
BLAKE2b-256 55c0b7fda9e8c5ea356cd7ac0881819a35edcd5c78f5cdaa0eefadf14de59dc0

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp39-cp39-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 0c0aaf9d19d2e2756b2b30227bca3257f418fc0640fa66dd86b319a51d17ffdb
MD5 544aceea7e379421366b76adfa82665f
BLAKE2b-256 77fac0cea6555ac13adecafa1ca61bf517d66b209fcbe8d9e8f204f38f0ecd7d

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d56aa0e52e0c3a4ea985d50a8107c332c7a609c7aa86b751f79b80c72d8e108a
MD5 00d06f80b13923e7f15504cca8fcbb35
BLAKE2b-256 d04e421c0b7e41b94d26056a42a7eec77cefea7bea68a3515b8f00754065f5b0

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 5eb958b5fa7fe73d50223a531e0c47671464f10386c9f8b8cde30978e1226cd2
MD5 142393bc6e21c5e6b28a930d50bfcb64
BLAKE2b-256 343879d5862215b7ae5a41644514aea84d00090e84fa1c588759cab15b0f09fe

See more details on using hashes here.

File details

Details for the file ibug-0.0.11-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ibug-0.0.11-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b7bafaa2101f4e9d3734344937f87b3c3e85f63594a2153d592307b1a1f33335
MD5 a297cc1ef65e6a595a0409e86ea0cdb1
BLAKE2b-256 4f489552d7b0b073ebb7e7c6a5cfc5c8ba96de35107c6e73815a68353666396e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page