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.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45efbc157c1b00a3588670748615c933213cc2c2501480ddbd30e41bb2e43ed2 |
|
MD5 | 53f880b4b7fde4a8a7c47b8dee88b420 |
|
BLAKE2b-256 | 3007e149409c5c005db9ee026c49dfc2d9f971adf17b411215ddb1bb342598b0 |
Hashes for quantile_forest-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2efb2bf6c2123ea5b2de900ee7f5b3028297d87f210e626692300687db681ebe |
|
MD5 | ae7b0632ab6332456eb214121a34d001 |
|
BLAKE2b-256 | 78b3ab519f85bee04e49f9973dcafed239e4bce780def30aa16484bb188d8a2b |
Hashes for quantile_forest-1.3.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3745c1524acc6fa3b813b749792fed74f19953858b6b56805a6236f6fbd6e83 |
|
MD5 | cea542b6eac9b7e2314a1d5986a3ba68 |
|
BLAKE2b-256 | ab430f9b873e68f58c3998a821e1461e2311bd96b350f1baef2ed3f5defcc894 |
Hashes for quantile_forest-1.3.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aff7653f91a465ad908892faadd01eec7eaf5ec98c54dd12513008ca0526c4f |
|
MD5 | 6d548d273218480cd21140aedba7be91 |
|
BLAKE2b-256 | 828b66c831e2d7d2a8c38a66cf43a711f2d08329266ec5eba4187f6ac31f1aec |
Hashes for quantile_forest-1.3.2-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eab1b4ca6667adffb26873e3f95b6d46c6443187a19feeb18c4ade14e064c4a |
|
MD5 | 887f0db00866ce511ca3b1250db36bce |
|
BLAKE2b-256 | 723a2d756a09816eb598ea5fde57a4cddcee1bab32b7ae595dc13e071d47589c |
Hashes for quantile_forest-1.3.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65b1ed48cc89024992c29dc2e02f84b4b8e135ff3da692a823abe87d646bfdfd |
|
MD5 | d7e94ccc8d5071ada54ff38fa6644203 |
|
BLAKE2b-256 | a595c777405bc35f9b165247d6cf7afd97911fc1444c66aa08fcd1fead113045 |
Hashes for quantile_forest-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66bca3fffd11351e29c5c9a8c995fb44be50d5b21965a6934ead06f8240f5f32 |
|
MD5 | 50fb0704c4934b70fcd5d01961db2714 |
|
BLAKE2b-256 | 02bb02b9068c5412cef6220b1696d78381ee78d26f4235bb3ef61defbc297f2d |
Hashes for quantile_forest-1.3.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fbfd3cc3a4d749dfd02b0c42e161761eeba2a9eda8263d3b30031657328b74c |
|
MD5 | adefe56a17f8c8189d9f952bd65bc8d0 |
|
BLAKE2b-256 | 2e9aeb693f193ac2da6e5af22ff571108a41a660771d829d395fc764f70863dc |
Hashes for quantile_forest-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 538b22db1d13e88891bd72986a671f2ee92943a09806f470612621fef2daa004 |
|
MD5 | 48aba19d560214cc0e043ba0ef7145a2 |
|
BLAKE2b-256 | 0003a8df7ec4ef4fdda8c6d961802dbeef2022750f535165ba6b001b04563e87 |
Hashes for quantile_forest-1.3.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a1163d9a6a8d62b4f4870d2eadc7990b808716a8bcfd632d1b77036579d8ebb |
|
MD5 | 5244be62cc625f33264651dbaa680f07 |
|
BLAKE2b-256 | a7fdfedf664e383af5d25ff5d8ee23fc6d51c15da3a2edd3731b0c53af2a986a |
Hashes for quantile_forest-1.3.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30d5d8a4e20b9dc14fd3b318f0899bde09478a7c0a092dd0b5ade2edaa559c7f |
|
MD5 | b1dd0b3c803f47bbfd26cdd9bffefaaa |
|
BLAKE2b-256 | c95a79e2adcd548f3d52c281e6839883a57b9d764ed479826917b502ff1fc277 |
Hashes for quantile_forest-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1de5f6f2bd428c033991bf46659fb0c5831d250c3238dda1bec69928ef5909e7 |
|
MD5 | 137a6807ce2c08de245fe7744bbf77e1 |
|
BLAKE2b-256 | 75b6a03eb510b81d6137e331f788a7907c9a649e65a067ea848a91faf6cc9b60 |
Hashes for quantile_forest-1.3.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 777a091f8a3de7ee1dbb48ab28a67601a644b9297c68dfe3dfe06510dd410bdc |
|
MD5 | 7721a865675386f06ddd0c63d0641b91 |
|
BLAKE2b-256 | 1b5221a78e08db6012f39bb2ad1685dcfd394751df5deca8fde993f5bbea8ee3 |
Hashes for quantile_forest-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3327b0d9ad59e7d1f5d0317dee24d264e92edbbbead399f650746e76acca9b71 |
|
MD5 | 12d106c7dc92d882c0cadd0aaaaa1416 |
|
BLAKE2b-256 | 5713a8973e247c74251d917dc7d982e5eb63fcc9b163a86cb7e03b7b242547d4 |
Hashes for quantile_forest-1.3.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac854a9f7f5b36ad1f5834d9b1942a7f86c4034ce2127000a1ae1941f09ba04 |
|
MD5 | 49fc85333f43d480acd011670fed5934 |
|
BLAKE2b-256 | caf6bd1140c0bc904a16d0dd754fb7124447f6709cdcb47109e8769a3d4c167e |
Hashes for quantile_forest-1.3.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1630da967b6037f795ac1c77e2efc11202bb3a36fd4849dde2bc70ea47e17a4 |
|
MD5 | 32d8122fd2f60114de198d5358de5003 |
|
BLAKE2b-256 | 73b0338b21726a923194103fea670d73c77725b900f3429cce29d98ab0f16ba3 |
Hashes for quantile_forest-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 014e8a43c0a76b6152a3b04c3b5bd652a77771d9259268dc4e2416ad6885138a |
|
MD5 | f2f15e743584ffec955fa8bd6d5aeb35 |
|
BLAKE2b-256 | 036a72d37ffa791e5ae92bd0e8757702b1a164d6399ce16012e7da9b46c3675b |
Hashes for quantile_forest-1.3.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b309812b54da5623df37685c56ec777fdd2bb1fa52f202fed8896838c6fd1d9 |
|
MD5 | 742c36ce1b64bafbe5e2ba4432dabb1c |
|
BLAKE2b-256 | 6d1bd463f5eeca5d0f3ac272dcade844d4896f83bb1e8259e1c43fa9c162c7d5 |
Hashes for quantile_forest-1.3.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d84e0f6842d62e2f2108fdfa89714fe593359cfa3d3f0bcb9b1af0a83c87f05 |
|
MD5 | caf2bf025f7f3ff7adeade99016a5211 |
|
BLAKE2b-256 | 6586c6c4dc1d3115a1a045c70147520b5be19e8b66f0a2f965c0bad658875f70 |
Hashes for quantile_forest-1.3.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8277388dd37ffbe3c86ffceadcf5104260eee298fab48d5b15526f3d71d01cd |
|
MD5 | 40b204f0f1a441bf5aea078e73cc841d |
|
BLAKE2b-256 | 07714569d97750b3592368e11009582ee12f2acc504dfa816e4730d99e11537c |
Hashes for quantile_forest-1.3.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f99a9fd658728063917fb860ef28d15e43c13d48a004081d89d1be6ebb8ca628 |
|
MD5 | 90ab75eea21b294add9b0af36f91d289 |
|
BLAKE2b-256 | c2104f30b19a6119e14e006fe7f73b29dda5f8e41b44004bd737cf6b7bbc817a |
Hashes for quantile_forest-1.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf12599d38cdb964223a38d8ee43f6c79040ce445ab0c90f9cea997624418256 |
|
MD5 | 742e99c14f3fd38a206c6530491f454f |
|
BLAKE2b-256 | e78d23f4a4d04f0abc654768909d739da441ced8b28f3831434b27fe36a6cba0 |
Hashes for quantile_forest-1.3.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5781d5c18a7ba44015b3e691a1c2a72fa0e11f7a562814f871fa272abfec4b5f |
|
MD5 | 841a6c62a96af556833aa7cdb057cec2 |
|
BLAKE2b-256 | 683d6f4e67d1f1122d4cd7fe045c2de4940cbc5e4cfab34e4e3ad765c7c5266e |
Hashes for quantile_forest-1.3.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4e5e0f7a52671ef7031dab8110d5c0896c2d7fc46c720be6aaa9ad8ea817fd1 |
|
MD5 | 90d625dfcb4a2760030ff9a43372225e |
|
BLAKE2b-256 | 729a7abca1377c980cca173758114af0754437dd765e125afd7b0ba46adaa092 |
Hashes for quantile_forest-1.3.2-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd834b88e7c8506aa2cab546cb80d3298dcb778fc2fdafee7ab1ca79b404b2c |
|
MD5 | 8e7825139a7f0e64724c93db2986b815 |
|
BLAKE2b-256 | c8d5e5fccee02cb6814e3012f4f6f14eb21857120e9e5170ba4361eaf9792e66 |