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

Uploaded Source

Built Distributions

pgbm-2.3.0-cp311-cp311-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

pgbm-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pgbm-2.3.0-cp311-cp311-macosx_12_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.11 macOS 12.0+ ARM64

pgbm-2.3.0-cp311-cp311-macosx_10_13_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11 macOS 10.13+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

pgbm-2.3.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.3.0-cp310-cp310-macosx_12_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.10 macOS 12.0+ ARM64

pgbm-2.3.0-cp310-cp310-macosx_10_13_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

pgbm-2.3.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.3.0-cp39-cp39-macosx_12_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.9 macOS 12.0+ ARM64

pgbm-2.3.0-cp39-cp39-macosx_10_13_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

pgbm-2.3.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.3.0-cp38-cp38-macosx_12_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.8 macOS 12.0+ ARM64

pgbm-2.3.0-cp38-cp38-macosx_10_13_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: pgbm-2.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 7299a59f3f8b0a1b169c68b47dbeff55970ac45ef23cda706e7cacc2b2918d82
MD5 b8cf4520c7ab357239443da46d4f4307
BLAKE2b-256 32fdaba2ea481f01125b9849350bc8cb5c3972a1fc66a2477f9c8677af9bcbfe

See more details on using hashes here.

File details

Details for the file pgbm-2.3.0-cp311-cp311-win_amd64.whl.

File metadata

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

File hashes

Hashes for pgbm-2.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 208c76e26bcd232fb0ed86eae575afa29a21cad4c4d062ae8bc937f9174518ec
MD5 7fa0bd19f9070638f98ea26ce4e81aba
BLAKE2b-256 4f376d56dd7e2e6bd8c3f66c2147a8a10931320b32babce49bb3cdd6296d1894

See more details on using hashes here.

File details

Details for the file pgbm-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 035b570d0a852f61a7873667a81ed189cdca552c049d36019d1fd2f3d322a870
MD5 a0e23256f6f0cc15778da89840473200
BLAKE2b-256 5a2cba6dd5d4d07d7754691d94a498835a4f8b47ecb369dcc7e7615b381f6a97

See more details on using hashes here.

File details

Details for the file pgbm-2.3.0-cp311-cp311-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pgbm-2.3.0-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 d87b1e37f8817146bb8c380651035ba706ffc110ee42ebcdd8fff4b74c1086bf
MD5 3979db9df4bcf8076291528f46cdedc4
BLAKE2b-256 4b70d29f657d2baba67c188dc2f9056299b173d8592c4b70cf6dbc45511aedfa

See more details on using hashes here.

File details

Details for the file pgbm-2.3.0-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.3.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 18a73815743fbdcc5fc132ab209b300893eb83036352b12957f73da5452f31d3
MD5 36d819186f1a0a0e2d948221b60e178d
BLAKE2b-256 32300952b74b9bbb30ab484ee13ff739480a69eba819397916665133f8911ebf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgbm-2.3.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.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d4277c9c4fe731cbb7fb8bc4a47fd69aa8c1e43516fb680b8d06830fd3bf61c9
MD5 85f2d00416bd2b44be4b0b4ddb0199d2
BLAKE2b-256 19587963f2d2d8cd056bfed1deabb7a46aaf3650b988195e7fbd8a190baed260

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 312269c112f8ce99e191c365543f0baffae460111b2b449ea44df050c6c4b44f
MD5 09d4abcacc3294d438d50015063d3911
BLAKE2b-256 b372663da8fcbe6c76cf81fcbbda8b67702c578c6843683aade8f83d521ad6f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.3.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 212777d025519ff75a5bd811105ed1a03e007b665fb58e0bfc0529c30380528b
MD5 c61c795092a164e61cfb3bcd993f351f
BLAKE2b-256 5e12d4d4538c9eaf9a000a29134dbf5eda38ffab41c96a03bf44a53758e17eea

See more details on using hashes here.

File details

Details for the file pgbm-2.3.0-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.3.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 117618a71b0874cd299def84efd78d72054f6189c078dd21cf93730a1b6c45fe
MD5 d4b54634ad4812bdbef0dbf6905ae2a9
BLAKE2b-256 918aacc7de646a774a93895e4c05da53bed876959ef657caa53c5e2eedddfdea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgbm-2.3.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.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a505cf6e700ddf7a88f2b22f876c59fbb49265d683675da545584f5a94b5cf17
MD5 5f04f3ec17e3a301c2cb3004919f9918
BLAKE2b-256 7df7fa726f34fe08bc9831e1e5d92ad152aee84f9e33a1e70f348045324716ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20bde5fb88ac6ed3970e1070b019a209b4378c280d282cded72fb4e66bf948ed
MD5 250dd3bf2348fb33c8734b02efd8e779
BLAKE2b-256 c7e38d5ca27b465df7553667ca9174bd33091ef5ab164281224ed036a4568805

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.3.0-cp39-cp39-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 f901c48f5cafcd037e409c85376c1f39ea4aa6ea1c7f1900dee94d597c25645f
MD5 94d42ed63c8bb4fc2e78ef7ec1fe2ee6
BLAKE2b-256 1f690efff2070155ee4efefa1b1dda276bccfc4b32154d342e5231cf75ddf6bd

See more details on using hashes here.

File details

Details for the file pgbm-2.3.0-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.3.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 33d4833babe1cc56b6198e5ffddc3f807f86aa36c2cc377f63cdb40397e400da
MD5 49841605a98285c586f833ec34bb7846
BLAKE2b-256 e63d37e9bb0349d4a4b361a24d4daaf81a56ce5f544656e80b58416e9dbac622

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pgbm-2.3.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.3.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4053d2a44908e7d7a626de6d13f26606dd0270e5c355f94b3564147f21105c9f
MD5 3dac8704d48c6997fc2318cdcd7bfaa6
BLAKE2b-256 64587822ea9200e670495220ef5889ca4578d67f971fd296a41ed2a5f935e76e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d156aece6c7e4e14b0f341d500c6235b3e0faa1c537b469a376dc3caffe127b3
MD5 92169e7b5b2d11ff417c8c4a6f374939
BLAKE2b-256 69a409b5dd018fd72b921295864e8e94f04f9e4b63ff96e00923bfecab061105

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pgbm-2.3.0-cp38-cp38-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 db22a45657a9cf73934109e3e5212867c221ef7428b4e1b6cebfb6e34d983bc1
MD5 398e35a9d08353dcaa0816e7bd1a88ba
BLAKE2b-256 1916660e5dcb8962ea613bc36efbf110e019b3f0e187db2218308151a258333c

See more details on using hashes here.

File details

Details for the file pgbm-2.3.0-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pgbm-2.3.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0913b1d5c72a6642d52794e98086ce578ea4c725f1df856f938ebd7de341fb36
MD5 5aec51642fc2a063469d327816dc959b
BLAKE2b-256 151100c1e6fbb17513532848c2cde9dbda98cace77dfa19ba21f31b39ff4fa68

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