scikit-learn compatible quantile forests.
Project description
quantile-forest
quantile-forest offers a Python implementation of quantile regression forests compatible with scikit-learn.
Quantile regression forests (QRF) are a non-parametric, tree-based ensemble method for estimating conditional quantiles, with application to high-dimensional data and uncertainty estimation [1]. The estimators in this package are performant, Cython-optimized QRF implementations that extend the forest estimators available in scikit-learn to estimate conditional quantiles. The estimators can estimate arbitrary quantiles at prediction time without retraining and provide methods for out-of-bag estimation, calculating quantile ranks, and computing proximity counts. They are compatible with and can serve as drop-in replacements for the scikit-learn forest regressors.
Example of fitted model predictions and prediction intervals on California housing data (code)
Quick Start
Install quantile-forest from PyPI using pip
:
pip install quantile-forest
Usage
from quantile_forest import RandomForestQuantileRegressor
from sklearn import datasets
X, y = datasets.fetch_california_housing(return_X_y=True)
qrf = RandomForestQuantileRegressor()
qrf.fit(X, y)
y_pred = qrf.predict(X, quantiles=[0.025, 0.5, 0.975])
Documentation
An installation guide, API documentation, and examples can be found in the documentation.
References
[1] N. Meinshausen, "Quantile Regression Forests", Journal of Machine Learning Research, 7(Jun), 983-999, 2006. http://www.jmlr.org/papers/volume7/meinshausen06a/meinshausen06a.pdf
Citation
If you use this package in academic work, please consider citing https://joss.theoj.org/papers/10.21105/joss.05976:
@article{Johnson2024,
doi = {10.21105/joss.05976},
url = {https://doi.org/10.21105/joss.05976},
year = {2024},
publisher = {The Open Journal},
volume = {9},
number = {93},
pages = {5976},
author = {Reid A. Johnson},
title = {quantile-forest: A Python Package for Quantile Regression Forests},
journal = {Journal of Open Source Software}
}
Project details
Release history Release notifications | RSS feed
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
Hashes for quantile_forest-1.3.10-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85d8b9d08ce1d1ecfba7abf0ad40e63300c54ac7e1f6e3716b0c97714229b08a |
|
MD5 | ef72ddc2f9dfed4c0dbafbda881442be |
|
BLAKE2b-256 | 0e9eff047f24bd46318048359a1c526bdc7f9e5986dd9df5d66c8ed78d9c14bf |
Hashes for quantile_forest-1.3.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67f065912a2ddce4d5385dcd2f75041362ef3dd4c9e7122bdb4c7028e261a1ef |
|
MD5 | ad6b9865baade519beaeb0bab07a3c2d |
|
BLAKE2b-256 | b25a0d230c36655a0703ac2c24f5186dc28ec86dc8a527875216cbcf4bdf9564 |
Hashes for quantile_forest-1.3.10-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1545667d0652f40765acd886f6f6711c8cbbfd7b4da309586f956d6190801442 |
|
MD5 | 75334a0a64bfde3d3819e8c556370def |
|
BLAKE2b-256 | 8a247962fdc274c77c6cba7cc803b7f2877f16108a45aa6ebb524b1cd454b4e1 |
Hashes for quantile_forest-1.3.10-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40376a5169843bbc4d58e9b019be4a6a6b73fc1cb50c11438f94376b458a4bec |
|
MD5 | 0bcacca9353dd1cee6a0c82aac156c4a |
|
BLAKE2b-256 | a0ba5b1cba9d4716cd7191784084edf8a64f7e9674be98fa2fbc760987a85f4c |
Hashes for quantile_forest-1.3.10-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6dde53cac8fb16de0f2ca18706d31e08560ccd40adde37577d7308ff2007293 |
|
MD5 | e7ee8fcab4a1ee965cb2e6c0d6dc5507 |
|
BLAKE2b-256 | 9c042ef77e1ff390c7eea5e06b1ccd05f4eb24edde853376af0d227f7dbd9b64 |
Hashes for quantile_forest-1.3.10-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 336ad04bc86fcc5b9969589b0e33de474b7e22c4ab9ef155a83693470b4bd9f3 |
|
MD5 | 8f348daec7dde9acaf3d83adbe189223 |
|
BLAKE2b-256 | 7d132eb5f90c05122f5dc400db47925702ef59c98815b78da99b3ddac0f4c287 |
Hashes for quantile_forest-1.3.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | add89b6e9f8a4f27828af348071d7ede602698635a4fe1349a5413c4cd73461d |
|
MD5 | da44791bf7a31103b44fb749bf183ae6 |
|
BLAKE2b-256 | 5b2f014194fb620035ccfd801f2c31ac618fb025153a944a8a0dec67d48547a5 |
Hashes for quantile_forest-1.3.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9bfbb08ee7d16f9735dc3e8036e010f1919eab6e8ec6c5e8517c581794ae7f7 |
|
MD5 | 8267b81caba22fc17b6c5384c33afd1a |
|
BLAKE2b-256 | 6156b1205a923f9ef8c991e0233fbf3014b68d55f1781077a38a0087f8e37ea7 |
Hashes for quantile_forest-1.3.10-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 786bc346a8865bd4a3b5dfc26aec08356a5c6134225c8fb3cb226689c30305dd |
|
MD5 | 6d0915b18496d5f56e20aa4ce17dbb15 |
|
BLAKE2b-256 | 3a1236b0745edb355836eb552786dfc119c976eb326ecc16bb035fff9167279e |
Hashes for quantile_forest-1.3.10-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7c5bf991e566c62fbc2945be08e30cbebf6068ed0eb8c12c6c6564973000252 |
|
MD5 | 8ebd17d6ee35e3a90a08d9691d69134d |
|
BLAKE2b-256 | dceac35d5573775fe96c92523ddaa2143e91f5f565b59d1a8234f53351fc3b49 |
Hashes for quantile_forest-1.3.10-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d39f02ee8c7854c990fe69bd7c42d07a2e3e9d865b452f8f163df799c9ca895 |
|
MD5 | 48b5b1c87668377a6731c543fdabc3a5 |
|
BLAKE2b-256 | 29f9aef40939b6cfb25b50c616864a861a244c20e7bba844d9bc3bd0c142ef60 |
Hashes for quantile_forest-1.3.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 781737d5efa789a2186e4a218ee43e46646e75ef81a2f91c277a39f495fc98ef |
|
MD5 | c04a7e66270a4f87495b8218ab6a9a73 |
|
BLAKE2b-256 | 97a418cb204d19eb1a3ed1f83205111ab6055e6829bce3647650bdd90e06ce29 |
Hashes for quantile_forest-1.3.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6173ba8482843fa2d4c8f56a3147b6a8ea51cb0edfd91540497d3301d4066673 |
|
MD5 | 4a036963890a91b01037ccf00f1b90a4 |
|
BLAKE2b-256 | 0610f447023dd2f3cc570251d6c7fcca46fb5a67dc35c0165df17ae91632c5dd |
Hashes for quantile_forest-1.3.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07a7c6e26b0f98b2d2fb5dce9069281e5795c826a6485ea4886aef1e10b13d1b |
|
MD5 | 3ea0072880a5127fcae7609aeae35a42 |
|
BLAKE2b-256 | 295c234329845acde1cf3525dcf93ff6de9183e136f1b2b89463981c6eff7201 |
Hashes for quantile_forest-1.3.10-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 920840be3c03dcac48c442a323002672c0d945c44440323ea127ca8792e7d28b |
|
MD5 | b6c16e8877606d860e5c9fb4f4d6962f |
|
BLAKE2b-256 | 6a10716ba3fc1655cb098f5bd434eea48a0c4fe32dc23f0ef628537703c8d9c6 |
Hashes for quantile_forest-1.3.10-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83dc8866999e21bf23cbc495803ec90d13a58a2f5f308bf84b6f9e429219c626 |
|
MD5 | 75bc4da130a58c59cf226bed70fb0186 |
|
BLAKE2b-256 | be26f010cd183c4b582214bb90980206a45fbf27965b46980f7def27e54155f5 |
Hashes for quantile_forest-1.3.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1ed0256b0967d3ac2dccf54ebf11162ae695630aff8f785bb70999790ab359c |
|
MD5 | 20d33777611a3aa4e293a2b2f380a745 |
|
BLAKE2b-256 | a6fa9cc0515b22003c3a17c4f1fa6edd4686f5d4fcdb2f6e82fa22a84903bd9b |
Hashes for quantile_forest-1.3.10-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c9bce4e7aa926cd8a48bec7ef862e2b58b9f7881b9b3abcffc90f99bfc3c05 |
|
MD5 | 71b9633f7aec54378f7e9a11f4f31e64 |
|
BLAKE2b-256 | 71f90f70a4fb610fbba5903deb8903bb7d53c42bf04d2f0d2cecd80118014809 |
Hashes for quantile_forest-1.3.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db71f5c27d203eeeaee1f0e610f844e8de2a929dd10dd68e7379623e23749ab |
|
MD5 | 06a946349752c551ccc736e9b903f80b |
|
BLAKE2b-256 | 883ee0420fbda89f46e1c787b7e66ee321c1b69725a27e6eb0645fc0e01f7c12 |
Hashes for quantile_forest-1.3.10-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6143115332cb2ffd8956068e438cc6ab173ac57429c78a4f242f737760a752b |
|
MD5 | f9aa148737346c31971315e4afbc83ad |
|
BLAKE2b-256 | 6930d0b5987beb095ba31353cb66b7f5ef00f427408ad6cb20a65a53a95826bc |
Hashes for quantile_forest-1.3.10-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a53b9ccbb9e737d9fff551f88f6f73ef721547e37f1454b467a6747a7811ca3 |
|
MD5 | 505968a0abf93770c27783fcdc837ce1 |
|
BLAKE2b-256 | b44aef43b316835b066f20e922bb860571a6842f7b12bc0042710eeceec3be83 |
Hashes for quantile_forest-1.3.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aedc42adc8f6e485ecb426a37ede59650e546829cf380e2e9c51f7f3c0310b34 |
|
MD5 | c54556d41899916fa44b86b36b97befc |
|
BLAKE2b-256 | 1b804c4d9241dee035ed10922b7cd968f39ce1764e16581c3d83ff6bca65fd7b |
Hashes for quantile_forest-1.3.10-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee74d0e337d2920be195fb7ef8bd1f9764bb7c61c6ac8245b043c58803dd0b30 |
|
MD5 | f0fe21a316579b7d34cd23f00ed76a23 |
|
BLAKE2b-256 | 77815787204b689c522c0c92217a04e1e2608222d490cbd7acacb1a83826b8ce |
Hashes for quantile_forest-1.3.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e87f32ebc9ddea3209c9eb43876e37748c49fb5304c8070a4fefce07bd3324a |
|
MD5 | 7e5546cabf46b4b037b401cafbe725a8 |
|
BLAKE2b-256 | 7fd73d83ef23baa001052bb4abddc79fa55c919f5fdb049ca315b45c28ea76d4 |
Hashes for quantile_forest-1.3.10-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28648b24c18b79dfd0a9316b17626d6736b80e15053aaa351f08b5dd252500ac |
|
MD5 | 91f147a2ea20c3a82ac6071db1f3474d |
|
BLAKE2b-256 | 0d78e841a227471cc01d2a8af3ee2cf2cc365a3420999294f504e139530267bf |