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.9-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 556840a3c9e4fd2c0f21701540c3eb641ab78265f53493349d04945480d26c96 |
|
MD5 | 9b1fc4325030510965be4d0f52613c17 |
|
BLAKE2b-256 | 61c941b275f9ca42dc7e27fa9623a26542c97f40ed7312eb7ba9826caed274a4 |
Hashes for quantile_forest-1.3.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d547c67a31bf726952ba6dec4f99c6e58f6173fd785039ae2895252e3cacca3 |
|
MD5 | 254fa74b94d642d7eb738fcadd81b1a9 |
|
BLAKE2b-256 | 7d449678dbcc4dbf80bd823cbffca3c7788c307cf2f048611cb2c7fc575471f1 |
Hashes for quantile_forest-1.3.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9432a59869b71a94dd06f65a128dd155e32409553ea046d0e2b0ede6f5374d45 |
|
MD5 | 8140d325bb7928ad9a40d32f18ec0ab3 |
|
BLAKE2b-256 | 905e626c470948ad69843205ed01199d6c7cc761957fdee0e7f09f695fc5cf3e |
Hashes for quantile_forest-1.3.9-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64bd8b37fb74afbc263a4216f8bdf066f126c3669370dcc3aef221983901c88c |
|
MD5 | 7dd097800c2bef81f7fab19e9f7b5c59 |
|
BLAKE2b-256 | ca7668721b174c4b354cd8dbb9947086215c14f9ca33e53c3027da22c90f11da |
Hashes for quantile_forest-1.3.9-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22a23784b58cc5efb6c0f2f3267cc8bfed9ac94f6354a40b3671d64844f0f03e |
|
MD5 | 873350124029939c607bdc01e6ce4a98 |
|
BLAKE2b-256 | c8947cb1bb5f7624d28ce07f2bb19f88250307378d152ef5f663a73256d33f8c |
Hashes for quantile_forest-1.3.9-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79aab3cb4d8af1531dee2c2d379f8e083f0a2152013a373d8fb9c17ad3b1d10b |
|
MD5 | 782372d6bc1d84d2e58739c61fd94cbd |
|
BLAKE2b-256 | 2826787cf6a0f0bff84aa3b096e96d9a6ca873c2af5803b4d985627fce7d78ec |
Hashes for quantile_forest-1.3.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdd39c02bddc46892ae0ac80f91e2792e1743680dcde1ef74d64839796cc3b0b |
|
MD5 | 6b841aef866fa58d68ed11c8f26d2cb5 |
|
BLAKE2b-256 | d0995e0ef3688583e484c44179b6470ea5db5836c08320c43ab1ea2028528093 |
Hashes for quantile_forest-1.3.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f3bf032c4969682e7ba7d604dc79b3c4cec1742a9a2817a061f09d8652e786 |
|
MD5 | 4ae8fbb33f098023dc573466eb4f83b5 |
|
BLAKE2b-256 | 46611bfbb9b3a89d7d8909abfc2b55a978039abe79af5bcf0bc34299d48a8413 |
Hashes for quantile_forest-1.3.9-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5627dae89ef16ad6ff30a4c73f0d4fc8f19abc191858cffb365eb525a83c2e5 |
|
MD5 | bdfd86ad4c9d026aa5a37a5da986b5a5 |
|
BLAKE2b-256 | a52d4eb4f898745354ac1692f4af074c186bb47d5ae9884daaf268b3814d7279 |
Hashes for quantile_forest-1.3.9-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d1331f6922baf9c8ac32ba7e8e384cb35f43ae27a2a5543eacd5fcb3dfb3ebd |
|
MD5 | c5628386cc491abe771c57898788f0c5 |
|
BLAKE2b-256 | 6cbd8402d990e6e82ae958ab26fc7527edb68a688a1c9576bf6f640e98f9e539 |
Hashes for quantile_forest-1.3.9-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3eb2e4dce8e8f19b9a2b6fa6e7b016886a77cd91ef31ad96975bd8ed9b5b059 |
|
MD5 | c63e8815d5e2022315cd0638ceb5c9a7 |
|
BLAKE2b-256 | a041b61723451d1e66d9fe62fc8a2f0a54041b746c6ca0b90cb68acebca49ece |
Hashes for quantile_forest-1.3.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1de37f0451a2c775b392941fc9e19e7676e1b11f6f3ecc7b4689105f6ee8054f |
|
MD5 | bb1e32fdb1fc4cb7542f146ffaad5aa5 |
|
BLAKE2b-256 | b8e39efa06919f59bd8698a308973c8087d157c59b806a7075c2c935249f0b3a |
Hashes for quantile_forest-1.3.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cd5ad89d8b18dbef4747d22116db1ab35730be2df9ab526ac20456da6d1a77d |
|
MD5 | 0431b48a222b275abb78f83d48d5876d |
|
BLAKE2b-256 | cb35adc1cdffe283734ab7e958ad0e5db37f32b67084963b74d8c875b6aee9a8 |
Hashes for quantile_forest-1.3.9-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6db5b0de47c1442748d37bb25efc145aa6b54a564c6a9dce7f5e2ea79f40c3 |
|
MD5 | e5584cc4c18b55e4f539a1ff66f8b0dd |
|
BLAKE2b-256 | c57f1441acbe39f464cafa4dca89fd332554f2bb97634ddfba277cc5c8e7cbdc |
Hashes for quantile_forest-1.3.9-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1846560adc04598a93b9f99d1104d3dc2ec3ff1a34c782376b0ffc369b05d42 |
|
MD5 | 898aa8e514393f4df978f7b2f6eb66d4 |
|
BLAKE2b-256 | 1bd0f5545f2d3d8f7beea17cb212ebe9658bba890fbb35e773963217bc13abde |
Hashes for quantile_forest-1.3.9-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d03b56f49a0acc2bf84ef0ca41c01f06a2a49e19d2277b38be6a135881fddd9 |
|
MD5 | 990695d158556a8473f237e9b6a8d272 |
|
BLAKE2b-256 | 3cd7123e8cea88eda1fd67c4ca9293168c54e63020fef70552022e0d4f1bdc74 |
Hashes for quantile_forest-1.3.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f0e35322a532510c70371efaad14a24f304a9c22e84c2ae5d389fcf6507e76d |
|
MD5 | 814879287cce0e1b3a5c277fa4081909 |
|
BLAKE2b-256 | b95edba939ef0e9a350b0ac836d13899e4135e47449670fee51f8ad22e95526a |
Hashes for quantile_forest-1.3.9-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb00d3007a5045ba893807c89f6894a39d36314f302eaadbbd9c19f95e2cc77c |
|
MD5 | 4b7cd8399784cd54c3f3c0169ae920f7 |
|
BLAKE2b-256 | f5401309bbb395386693dc4fd044188be79b45635713e8c216fc47fee39d196d |
Hashes for quantile_forest-1.3.9-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e2d2675e793a39b2139efc56adabbd8da295a98d5b3992de914d41b4434301b |
|
MD5 | 9a04491311c8cdf98583901341abe6ab |
|
BLAKE2b-256 | e559486d0ebc9d8e48abbb86ea9b5fa52ae39adfcfeda977d5225aed9984dd2f |
Hashes for quantile_forest-1.3.9-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48754595bec27249df0538415377f0def498a7494748ecc45fb94e9c905e0953 |
|
MD5 | 2824bc5319b3afe9ab6bec489c05a203 |
|
BLAKE2b-256 | 75b4235189db89a9f9b9065f2e8a64636d029f7ff0db1ac392bfe5f8b79b5bc0 |
Hashes for quantile_forest-1.3.9-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3111f13dcc3e45a1802ab7a6d47fe8d5fa59d9e2fadcbf03e88ea9df66b7919 |
|
MD5 | a39a32e8850b6ef7caab11ba4d0944f2 |
|
BLAKE2b-256 | d83187d9b27370a5f78146a95f92bdb1af1594326c64591dfbce2bbde30eb119 |
Hashes for quantile_forest-1.3.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97085124e4f53eaad2c04397e9915d5f4cb6842e9f2b53fe25ad069cf4af3e56 |
|
MD5 | 8a34bfec07d59cd51d05f10aa86f3dfa |
|
BLAKE2b-256 | 6e7993266587879f36fc7d7ce82347119d5936cb042d99438956959ff457571a |
Hashes for quantile_forest-1.3.9-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aea0eab2ffc610af320cae20a562bcb818364b9e042d8dad568d7723b232ffc4 |
|
MD5 | 03219f6c98bca5a455233d8fd4a3776d |
|
BLAKE2b-256 | 69f653a6582abbdf923845c73a66e2935d843400567a8e29681be0818d8c3ad8 |
Hashes for quantile_forest-1.3.9-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e83c788838bee6c5bce161af33420a4ef18f0b6b909f66b6bd6aa0b77433a910 |
|
MD5 | f4a8f3b05cee5a93476f918b32348ba9 |
|
BLAKE2b-256 | f30045db440b2a3821836dbacc8dee3c7ed37547d0c0939a49f22a86378f7096 |
Hashes for quantile_forest-1.3.9-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8491e17a13c0371abc9e6b691cde47c9a2be3e8f3fa680523bb48af103aaeaa |
|
MD5 | 7d603be6cf70042af763d49d3eef3554 |
|
BLAKE2b-256 | 7dce120d606b1cc2d13cea65870fd088601afde6a17b3960a5308c438d909e91 |