Skip to main content

Probabilistic Gradient Boosting Machines

Project description

PGBM Airlab Amsterdam

PyPi version Python version GitHub license

Probabilistic Gradient Boosting Machines (PGBM) is a probabilistic gradient boosting framework in Python based on PyTorch/Numba, developed by Airlab in Amsterdam. It provides the following advantages over existing frameworks:

  • Probabilistic regression estimates instead of only point estimates. (example)
  • Auto-differentiation of custom loss functions. (example, example)
  • Native GPU-acceleration. (example)
  • Distributed training for CPU and GPU, across multiple nodes. (examples)
  • Ability to optimize probabilistic estimates after training for a set of common distributions, without retraining the model. (example)
  • Full integration with scikit-learn through a fork of HistGradientBoostingRegressor (examples)

It is aimed at users interested in solving large-scale tabular probabilistic regression problems, such as probabilistic time series forecasting.

For more details, read the docs or our paper or check out the examples.

Below a simple example to generate 1000 estimates for each of our test points:

from pgbm.sklearn import HistGradientBoostingRegressor
from sklearn.model_selection import train_test_split
from sklearn.datasets import fetch_california_housing

X, y = fetch_california_housing(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.1)
model = HistGradientBoostingRegressor().fit(X_train, y_train) 
yhat_test, yhat_test_std = model.predict(X_test, return_std=True)
yhat_dist = model.sample(yhat_test, yhat_test_std, n_estimates=1000)

See also this example where we compare PGBM to standard gradient boosting quantile regression methods, demonstrating that we can achieve comparable or better probabilistic performance whilst only training a single model.

Installation

See Installation section in our docs.

Support

In general, PGBM works similar to existing gradient boosting packages such as LightGBM or xgboost (and it should be possible to more or less use it as a drop-in replacement).

In case further support is required, open an issue.

Reference

Olivier Sprangers, Sebastian Schelter, Maarten de Rijke. Probabilistic Gradient Boosting Machines for Large-Scale Probabilistic Regression. Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD 21), August 14–18, 2021, Virtual Event, Singapore.

The experiments from our paper can be replicated by running the scripts in the experiments folder. Datasets are downloaded when needed in the experiments except for higgs and m5, which should be pre-downloaded and saved to the datasets folder (Higgs) and to datasets/m5 (m5).

License

This project is licensed under the terms of the Apache 2.0 license.

Acknowledgements

This project was developed by Airlab Amsterdam.

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

pgbm-2.2.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

pgbm-2.2.0-cp310-cp310-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

pgbm-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pgbm-2.2.0-cp310-cp310-macosx_12_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.10 macOS 12.0+ ARM64

pgbm-2.2.0-cp310-cp310-macosx_10_9_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pgbm-2.2.0-cp39-cp39-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

pgbm-2.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pgbm-2.2.0-cp39-cp39-macosx_12_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.9 macOS 12.0+ ARM64

pgbm-2.2.0-cp39-cp39-macosx_10_9_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pgbm-2.2.0-cp38-cp38-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.8 Windows x86-64

pgbm-2.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pgbm-2.2.0-cp38-cp38-macosx_12_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.8 macOS 12.0+ ARM64

pgbm-2.2.0-cp38-cp38-macosx_10_9_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file pgbm-2.2.0.tar.gz.

File metadata

  • Download URL: pgbm-2.2.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pgbm-2.2.0.tar.gz
Algorithm Hash digest
SHA256 c0a58be2a35844893752422ad5b848731768dc8fa89e3e4f7e6f86704aff6f31
MD5 55f60249c1c6b9a43c8f1604b31b30cf
BLAKE2b-256 cf6099ee62b855ba12710255f4aa31a1564ac17811576d8d496e3e257a5042e9

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pgbm-2.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pgbm-2.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 64aa141a7b5e24e4e6e66c34fb61ee74bf7deb853c1c688737fa2cf6b75fdfa4
MD5 b16b6fed90cfa8d10530749e20f67ab1
BLAKE2b-256 5cff117443ef034cf1aeeb912cdeaaf962a14e4aef5f086cebe05ce65e2602c6

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27aa66b609ef49c8a16f025b0e6004de9eb6ba1e10acf552213eec558ffe1e20
MD5 b2f7db9ce70b197355290bcc90fba7c0
BLAKE2b-256 f63d45ad12713df2a2fe7f95e9066fb75516f15430fa2c792051e573985105d2

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 1aa12ccd3fe2543c3cd9100ecb170fb64c163fc12b4b20aaae601fe9764844e9
MD5 3b1b4ebd99e4580b64e668c35a785d25
BLAKE2b-256 709d1eef27e3f09c2c1db404455843c338bf85f2f5301f602b86658137b97d60

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f36837179d9388cbec20ecda960bc8ffd28d639976407bb99e7a1df047e2f7e6
MD5 7e799c2e43ff8e0e0a0a08e84d940c08
BLAKE2b-256 39c1c1e929b880b64cccc7b3b1927fdabaf52973e8087cdd23e0ac9583e4380c

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pgbm-2.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pgbm-2.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b06bca1817e3d78a7f29f3c0b3446c3df246bee25da488c56a95159027aa0173
MD5 68ff1bf71f66daf0cdc33a47fef4050f
BLAKE2b-256 40294b2aa742f4933c707ac3b6a7e3d8eb021c08933c90a9859a68e09f514dc6

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dda9112307f751fc463fc94ac5461ab7977276594da6827181b464f713fa76ad
MD5 9cc205cf562cb1bbab2e634185250991
BLAKE2b-256 c6425974a824193e128007c1431f5e0278342af3f4d48d93b64a69f7b4d4b786

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp39-cp39-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 93d9c7189bad7ce03bd1d9e397e0d6d02245d8723bb4ecfadb2a76358b1507ea
MD5 49a9655be2823d8cf3d6ccb6ecaa2d63
BLAKE2b-256 d5e48b58dd75f4fc202d79530b29f53ef1571233f8954c0ae0279797966adb78

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e6d64fb44e530791d4b68528bcd2544b70e1bdbe7473ab241cbe8ec04c4a44bf
MD5 8b187d9fb836092d9ef36567a633cae0
BLAKE2b-256 ca8ace5af8a03d51762ab22179d111d6490d1f1e02e79beb691f3df99742e692

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pgbm-2.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pgbm-2.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 082b5fbd30a77fa03c82053f83e5c3413433940108ca8aa3b1d6f260d15a2a95
MD5 45eeaf53ec0c6ad1801940c3cf6d5c5a
BLAKE2b-256 25b946e86835449d948633833d259eeb5e220a489c2b608e5c12f972d37428aa

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 540c46921cad8471c36ae5fe9863e6a6ee48549f85a2f0c736df9f2f8a09eb97
MD5 7879975264ba9dfd875535d1bfd7130e
BLAKE2b-256 e6999e4102089d46c4e0a9c79139da597725f53c70a229ba7297a20f0cb0bbf4

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp38-cp38-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp38-cp38-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 8cb2b13096acc44955c94b3d6a3b407f513f2d3ab866fb938ac6cc3772752c8e
MD5 bda8a2f54faa6fd6213ed435ace6626e
BLAKE2b-256 900d48f6704d220f27da9bfdf0a245ab5b91ce2a63ab3f650be37a9e497c1025

See more details on using hashes here.

File details

Details for the file pgbm-2.2.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 de51d79a9952479a5514f9ce8098009aed5587b1b9f0f469e5aeea1c509c6327
MD5 861d5720f04a4e2255af9151ead248a9
BLAKE2b-256 7292bd0097f96d64b6aa77179a6d630f82a4519efca25a23c951404b97735d88

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