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.1.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

pgbm-2.1.1-cp310-cp310-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

pgbm-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pgbm-2.1.1-cp310-cp310-macosx_12_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.10 macOS 12.0+ ARM64

pgbm-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pgbm-2.1.1-cp39-cp39-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

pgbm-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pgbm-2.1.1-cp39-cp39-macosx_12_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.9 macOS 12.0+ ARM64

pgbm-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pgbm-2.1.1-cp38-cp38-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

pgbm-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pgbm-2.1.1-cp38-cp38-macosx_12_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.8 macOS 12.0+ ARM64

pgbm-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pgbm-2.1.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for pgbm-2.1.1.tar.gz
Algorithm Hash digest
SHA256 a3cf697f55dfc4e4e86a6c66738bf12798aa19a7592fef50846c0a7c4ea2167d
MD5 941e8b053e5bef9dab104e352310fd91
BLAKE2b-256 0f8e007bbcb8e0bc4bab75bd6e4bc47f51b35de321e19ab76dbd8b638ac62b8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgbm-2.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for pgbm-2.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 707ed8a13212ea6fdd7cf8732a869b9daac11b8f1ef2f87eaba8ca33a6a99c99
MD5 ec773a0af467e083aa471202f11910e0
BLAKE2b-256 d80e56f9955fed6804a37a1e4314bf49602bd1be350063dda1d9dd29b0a8321f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b3ca537725ffb3c00f8d020bfeff0c3ef49b3ccb595f19ee1eae291f0f839cd
MD5 f52a213bfcea9babede504a655efa4cb
BLAKE2b-256 36b5c439add17c8ff2125ca690c0012b6dbec4a59d0aeab1be33f881bdd1a802

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 aaa459aac4e1ffbbf1b1268b9bcf0a0c838cc9eaef92f74e1dd2277978142885
MD5 da701aad6ef3970132d056904eb60761
BLAKE2b-256 a906b836e2fafc300639f93a54ea76ea6eaacc6542070cb3551d62afb0ea2133

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fa6ee2816a3670a8b7de6b7cd8724b61c25c70de0229561a882ca74cb9f179f8
MD5 946f7954748fe466cc66f3ee48642381
BLAKE2b-256 f883a974c4afb8a6bbe09caec4b2537b5b3ad728d795659678b03ac63694ece9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgbm-2.1.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for pgbm-2.1.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 af3abf19bbc49d41d9c7edb02778f81b302df0cb6160f5b769c99bc2a7ddcd2a
MD5 4a2961bd4bcec24aa71361d766ffc509
BLAKE2b-256 78e9668945db40dd779169672ee35c9f76702a92b91bf14237c8c297db0d9938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e3a057452ad0c69883e1d9db59a0cb7fe922af938326ed2953a0140a44ae3a1b
MD5 adbebd0c6d4cd23dc1c7387a3b40a072
BLAKE2b-256 40948b165a6d4667b41c5b4b8e895ba3051d7dae8e2d4e908fed9519225d0f54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 45223032c5fd037da3f21449e48f1ac1f86474516fe96202e183c90c85922d55
MD5 88b291b3dc344c484f50844e56f2b50c
BLAKE2b-256 bbaeaa3f771655c9cc83ae251f86783c9eafed2f5a29a1c30db5c4ecbcb6886e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3f6e91fdfb1cd98ea677ccf4ec2de05bac0bb79163fe232b73adbc52cc931fb1
MD5 88b90fb00ea429afa35e800d9d2b864d
BLAKE2b-256 eeffd6ce9cfee01013536217c76020cf7d26bf4a5d7de9803eac038a1e80d57c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgbm-2.1.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for pgbm-2.1.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c486b5ef94a60777ccc8a76ea9705c78fb53120155b9c88991ccd74fcab7ad49
MD5 a64922e73f59062d2284366f8ad8ead5
BLAKE2b-256 b9cb3c6429517b24d771b1b7df51f4ebc39e948d261d27689e47c5de1758aedf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f1f4758050ee41f657ec819e392fd3b87196543d3c4c853576b104f0eeeab7b0
MD5 2efa48908afd64ed5603cb7c019bbdb0
BLAKE2b-256 63d0c8119a9c7508fd65daae84b8aa03ad2fba0303035b0afe52ba79a147381b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp38-cp38-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 232720b6e87f378734e6c980a9afdaf02349b54a988efdd49d0bb88a1336efd1
MD5 a12a07b98a9dfdd55cfc876854bf4b05
BLAKE2b-256 8fee7f27b47a6c77ca32acbd0b9275a15d15dec2676e85ed78247e34eea5a1fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5059ef72715850b62c105e9774a30ffebaf600242c1702c22b6ed8ec67595fec
MD5 ac45dac1550b034775adc3f9d6bd4fea
BLAKE2b-256 0deb023b8bfa8cece11f00e6a114b541af088a28f38f61ff1ee7bcbd13d7aa65

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