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 variants.
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.1-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2c249801bdd5ead77d5c46a91d488e0e960587a3230b371fa61aeb357f759b1 |
|
MD5 | e8419d2bad6e995fd2be9876392167f2 |
|
BLAKE2b-256 | 95b9e66665b43d912efda9cd9b65cd9aa32b600fcb71bfc974cd0eacda9b0156 |
Hashes for quantile_forest-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4585f9433de21cd22d5d895f34541be929870c170fb23c9718734e3b73dc6ba8 |
|
MD5 | ab7a3308a278e13aba2333fedda4f30a |
|
BLAKE2b-256 | 51f429a6f3947bab1af633026be248a1604432ae4c1c0c90ce8d49b4cd7f0f53 |
Hashes for quantile_forest-1.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d99b0572c1b5bd4d02b2353e480fb06af8c59dd2bd55faec3dafff6228b46b05 |
|
MD5 | 004569d9a307331213aa95b384a38505 |
|
BLAKE2b-256 | b9157795274f85e912d68f5dbd38a4ba3a49f11c87d999817eb031b837509942 |
Hashes for quantile_forest-1.3.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2929f4944373567a22b26c88a076881cb15718290d1fdc7ef4d2a5e0f28d46ce |
|
MD5 | a2fab4d0065d2bd4378425555ee15991 |
|
BLAKE2b-256 | 001d225a78dd781aa070fd6482480750ccf286323fa9b90a4170d4b6ef21aace |
Hashes for quantile_forest-1.3.1-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29e8d12d2a6ce68985763c30cfdc4205c8c31da44346d76d3c90998e49cfd2fe |
|
MD5 | 737aa99ffc1a18fc86dc31b243029568 |
|
BLAKE2b-256 | f6eeb5dda3e11055ae0ae49fc58c097e54311b92979724cc140d088ecb32192f |
Hashes for quantile_forest-1.3.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df7ce6fda5869a63d39f8dc6b88fe86cc6bce6ea19388dcefaaa9cebdd705c6f |
|
MD5 | bd2fd00678174852861d8caf97b401db |
|
BLAKE2b-256 | fac19371fde38dc10ee39bd6b4ab27e0a139722d5e720cad3e4aaddc972bb0d2 |
Hashes for quantile_forest-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bf729783b51abc16f29e2a4d68aacb64ff63188e2789d04553a0b05831d3ec2 |
|
MD5 | 354f27e2d57ca4bc53ce755508a82e13 |
|
BLAKE2b-256 | df167d062dd3556bb154dfa34acab5f5106e90bea93652af05d8d04a95e7081c |
Hashes for quantile_forest-1.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7402eb2ee646ca8178198295334a57de7b91d5ff86c42bdf01b8726c4f09a789 |
|
MD5 | 34769a3ae8b9ed6baadfe97a7cdc0130 |
|
BLAKE2b-256 | 8cdf5cdc21ed645b9ae1d04dbb5bff6b7e0d5e8d8036dd1b37c26f48cdc4acc8 |
Hashes for quantile_forest-1.3.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afa9aca05603c98b07b760c7da626ffafabef64dad7c0368f14509773ec3b336 |
|
MD5 | ab5da8809fd7d521e684f433f39d1b24 |
|
BLAKE2b-256 | b8eebce0db19f02850d64ba2fa9912b504915695af9f94b773f1c00e60a1e4b7 |
Hashes for quantile_forest-1.3.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06f7963a66639b681380aa08a830706b3f17dc6e49ef94c135726043c6d59bdc |
|
MD5 | 15a52ed35bd3a7656ce43a264848cfe3 |
|
BLAKE2b-256 | 34562f50ed4b19eacab1321803e28e71ed0202c5189fd757085119d5bcc49ae0 |
Hashes for quantile_forest-1.3.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 431357b224af28790db27646a9e203d99166796653311bc27cca26535e6e8663 |
|
MD5 | 575d249471d5f4d4942bc36018405d6d |
|
BLAKE2b-256 | 8b797da2297a523ea34bd1358bd5c88a400f04c14943fbb0c1aa6db396259f63 |
Hashes for quantile_forest-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2f4e39e4f592b6c531753c8e6dd3fa8ab01aa8cc312d4a1914dcfe45790d32b |
|
MD5 | 30fdf58b66978d4daa06624becc30fab |
|
BLAKE2b-256 | 68287420c91ea39c8dc3e88e0d41a3d6b7298f767b24f3fce076503974d27867 |
Hashes for quantile_forest-1.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c1826555f62810c225095aa2126517e9495d5a5b07cc087a1390e591beafc68 |
|
MD5 | 325ad9b9ce356eb712c55bb4b9a10001 |
|
BLAKE2b-256 | 348289a05ca4b2f981943b949aba1d980d7f8e2beb1fc9a38cf16adbe5b3fdd8 |
Hashes for quantile_forest-1.3.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7d1f4db46cf2de4cd381022d307b18c2f0669199a210be00c3a2070a1d32cc1 |
|
MD5 | e2859bdd5d81806d54974c85d42a0601 |
|
BLAKE2b-256 | 0eafff5eafe2e41b4826baf6620a50a50e9baaff292bc888cdfdb5a8e7fa9259 |
Hashes for quantile_forest-1.3.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a572a31645b713f1a3c63edbc717e4d0b308f40b18d142a1a865d46eb05dc29e |
|
MD5 | 574811022333ee565786eb7d9538a3b3 |
|
BLAKE2b-256 | f33f78e5885d0f5e09ea03d7a96aeb9223bd3b6bf819348f552314930e778e34 |
Hashes for quantile_forest-1.3.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96bf8a174dfd727126d624822e4425c909472503279332f494e01e779aba71c6 |
|
MD5 | 12a74887a4315d8b85f354430fd10c2c |
|
BLAKE2b-256 | 468a36683e4da2971e772a83545e50afcf78fccbe07f606a34394e0bcde495bf |
Hashes for quantile_forest-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d74be894ba624fb52ce5a233c518d003e04bd9155c40144af1fb793873603d09 |
|
MD5 | 292a2fe3efa8b76bf4b1e79e07d5627c |
|
BLAKE2b-256 | f9954ca7cf980bbf4aea6b71a033981e195adadce19f8829ac597c1239a8ac31 |
Hashes for quantile_forest-1.3.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f87152b7d75da498f7036f9d702beeb3b6d309713ec3ed7c81860f583c7afe18 |
|
MD5 | ca1bc74f15f345259e1dfdc3f8dbc4ef |
|
BLAKE2b-256 | b8a3fd106de2311386e41fb46b8a01d2eb569c6bfcaf99bba3a0c7fb1515422a |
Hashes for quantile_forest-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2f750a209d1c0e2c6bb1a9ffd1c0ba23d9cbf89b8086968f99ce9fbede1f32f |
|
MD5 | a5e2395d2fc318f9ff07e920c236deb4 |
|
BLAKE2b-256 | 1970e203ea14b684e44063a3a59861c8bcf61bd9163c2de4d690439bc151423d |
Hashes for quantile_forest-1.3.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 899e4dde71bf47375dc68167d54c2304836cba05e8462b04eff771b361db515c |
|
MD5 | f0d09c8d76c3bcf5512bbc35bdc3151a |
|
BLAKE2b-256 | 4107beea4a30b8c25d4646011b55319b1ecdab4cc1ddf71a1bf3e2ff74977590 |
Hashes for quantile_forest-1.3.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0f7351d8a0763ddc749946004cc1129c66b762b6f2241384a365e62257b5fe3 |
|
MD5 | 034d8b2a28d9e6d1e2da550735539a7e |
|
BLAKE2b-256 | d97b37d79a7c75e786a9c49d1bf18e86d17994dff688c681e83a1cdb4d4cd6b5 |
Hashes for quantile_forest-1.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db99c532f7d7583b1dbd44dc1f67b630720fc3f5811945f397004ff387e9077 |
|
MD5 | 7c33c0563a4eb9ca595d6a2a4fefc778 |
|
BLAKE2b-256 | 084b410b7ae0a05e5cca5b02991e4d135f8ea0fc7c1d2e6f85fbabb38a165691 |
Hashes for quantile_forest-1.3.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e49dad065915cbb07584f4fd3139ccbc8caf9073b254850c9ff1efe74628f73 |
|
MD5 | cf53e552f592b52fed3c34fcd77e9aa0 |
|
BLAKE2b-256 | 0903e7f5b243331beae4fc7bcb4a69282cfa98a3dba88987ca7458892c71bd2b |
Hashes for quantile_forest-1.3.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df9b7cb0ad91831891742c68dff3f4bafc7ad531e27348927fd6e91c824ee36d |
|
MD5 | 9fab9bbd85a170f6dfc8925096a83222 |
|
BLAKE2b-256 | c8f6d27a68b7d00407cd0ccdd447c2f15d1eaf51c019f0a035c0bd41a1d0ce1f |
Hashes for quantile_forest-1.3.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17762da958e867257ea79a7336caf177574c55f33704b164d78dbe75c260418f |
|
MD5 | 3920d211130ba8e48e4159f4c925761e |
|
BLAKE2b-256 | 005f068285f369f7089dfafbeb61d6912d7065dfdcbd3c1d10e8a20ce1c53739 |