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.6-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 716e4b25424e1d63b67323a806812db7b35b2be8153a0e2e0f2916be1a61fece |
|
MD5 | 93af107e2caa7271c3444d47ca3070be |
|
BLAKE2b-256 | 66cfc80bed97ab7f1abc0395ec4e742037171a9ce2386d5b530f0ee2ce1251ea |
Hashes for quantile_forest-1.3.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6866cad1ed0101a9bbdda313c1b3e7692d70a9a9273a7d6003f015970b6b8eb1 |
|
MD5 | 54b558b548f6c38a6bc2eda5221890c0 |
|
BLAKE2b-256 | 69d9733706232690fad7644525a703f434db6a1e1e54f45a5baa06c2f8a2b1f9 |
Hashes for quantile_forest-1.3.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e419783bc28342cd45995128931eee68c94edb6bcda7275c143c8c892d0205d |
|
MD5 | c7807e52c48faf5adb6e44b4cc49c392 |
|
BLAKE2b-256 | df558f5ef3f91a54346362b800924bd1fa0707a1fbf4066f519f82578bd03d4f |
Hashes for quantile_forest-1.3.6-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffed3e4663513d587ef2127ef413d29c2767f515056e7d69cd5af8041cc9a225 |
|
MD5 | 335ad8534f0c6a0d267871f79653a6ac |
|
BLAKE2b-256 | ba48b3bd6ab32c634717a159f58248c152e90a3fc4dbf504323e989832fd73e7 |
Hashes for quantile_forest-1.3.6-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30d7172018b96e0d97ad336affd7f9ae5345376320eee0c825d1dd396e6240ce |
|
MD5 | c83abfb794ada8ebaf26809bed94fa47 |
|
BLAKE2b-256 | 2baf1c2ab7cbd5fe6fbfa02ee23a65814d5b9691461b6920f00d7d2003aae1ca |
Hashes for quantile_forest-1.3.6-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9218438cd967131ebab2a260ba4359036db7f4de341765af919d5274d2d225d |
|
MD5 | 44500336efd943048ee273791e333df5 |
|
BLAKE2b-256 | 8e7e4cd8477e7a8b8ffeee760c20514c99894e13651fd3060354b67deb213af8 |
Hashes for quantile_forest-1.3.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d01140893bdfefa3ed2d9be82e5acf889ead7e0c80ebfa992e5f1714d2996163 |
|
MD5 | 75cf12b912fd37517bd6d9b5073a6695 |
|
BLAKE2b-256 | 641ba6d141e61b8fe198a10c943eb23020de2848aebc74e4434ed04bc9fc40af |
Hashes for quantile_forest-1.3.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5fdb2439453da08102ecc6774993cb608911accd40b7fb0570e512b40cdda4e |
|
MD5 | 3f66303b27f129c9f2f109567879b9a2 |
|
BLAKE2b-256 | 5e0be9d9f371867d88d1388b40c05dd0ed2dc880187b83772a12f24f0faa4d27 |
Hashes for quantile_forest-1.3.6-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f65d8206f7db2daa567bdb38ec7195ff7c717f0462c61321c4ad5788b4a70ec |
|
MD5 | 30ae5b172fcee297acfe312d49b75ee8 |
|
BLAKE2b-256 | 0ffc83c06eed5a136c28a6ba1974787316762fe3a0ed20bdb6ddd6936940b91d |
Hashes for quantile_forest-1.3.6-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4015483e041af03f8340d9557c2921e10a30e49fa2fbb1ac4bcb8dba0a1e82c4 |
|
MD5 | ee6317c52b72af2eff05424505deb3b3 |
|
BLAKE2b-256 | 487cdc609f78491e5e722c77e7a7fa24c822f702cae6f58c9ae480d4962dac47 |
Hashes for quantile_forest-1.3.6-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92a8f627c8518f26c17e71fb3e11f1b31dc2b2b922c6341724093ccf2b6738dd |
|
MD5 | 0f2b55ffa100318f5564345acf03dcf8 |
|
BLAKE2b-256 | 634afa17cedbe539c320727d1d0725e2f56bb36d6c6931a1de196e535cb38e03 |
Hashes for quantile_forest-1.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c280af9faed7bedddd21191707df23a047a4961d8b2fe8ecec7a478b60eac1c |
|
MD5 | 47e860f70f2961d0e204560f062a48ca |
|
BLAKE2b-256 | a4e565e693ea79c6ae6ec95d1670f558ad97c14e55b25f4665a6e8d1f091e33f |
Hashes for quantile_forest-1.3.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1606ea0bc133f543743e888a0b695da118a9bbd75614d3a66c3eb205947a5740 |
|
MD5 | b74d3d4e848a4e321c9c44e02110e3f9 |
|
BLAKE2b-256 | 816cc383f9c2f8ec74d64627c18d774da05c61e94297675e944894e883778e0c |
Hashes for quantile_forest-1.3.6-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86e7daa07cbe06494a26cf0e39076b44cd9da2c6ee380fed33316ff0e7f2ce2c |
|
MD5 | ab843719953d5f3aeed3470268480231 |
|
BLAKE2b-256 | 606d8e26594051dba7cb50ba6f9b1c26fa2a74fae4c725ae1ac3510d7a271e96 |
Hashes for quantile_forest-1.3.6-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f006c068460726777c2fe74af34d16ccdc1f80d9feb016e819bcf6a0f94ba55e |
|
MD5 | 163837c5c104e120dbb1b18f833c4a06 |
|
BLAKE2b-256 | 91d7c5a1643f171e06f95ca0d0e1d2c5fcb215c9983859f743f6c95ef4333f74 |
Hashes for quantile_forest-1.3.6-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f277b09c0652beadc2135b394d033e453d72baed2bc02d27c421ebc7d411d5de |
|
MD5 | 5f09c40ba66d55c147790041092bb30f |
|
BLAKE2b-256 | 1b70c64c7361a4d39d51e99e8151f3df9758ce04a83a1a5482f6e1223c2164e3 |
Hashes for quantile_forest-1.3.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e52d9745bdcebaa6dcd0cfbb8182e724e703f02ffa6c843f10e6eb8e6d0c68db |
|
MD5 | 12012596d6b16ec2d66fe4fc9d34ff8f |
|
BLAKE2b-256 | 6143f66cd20b91e24ba65a154788478f38713889324aef629f29180d6ed7d492 |
Hashes for quantile_forest-1.3.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a673fc6b34daacd880066bc76214e43f1d6d27c5d6088a826023f34182f26b68 |
|
MD5 | c61706405b2f588b573a964fad633821 |
|
BLAKE2b-256 | e4604aa2d7f3dc7acdcfbb9686cc1004d47a6146035d7ab17e682b11d3618f6f |
Hashes for quantile_forest-1.3.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6aaffce2dc8e24e06c073f88740bf80f5221014ef667f8ec919096628304b29 |
|
MD5 | f32f33c0fb02d89e8d624ad21d82a540 |
|
BLAKE2b-256 | 6df6e50c4d554388c1f7e89785423d05eb00f8c88276ee5ccb2ad0dbdfba6f55 |
Hashes for quantile_forest-1.3.6-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f2e5dc2c8d8a5b36227c5dce657378b1200fe74219900263055d9ccd2925811 |
|
MD5 | 90c96992e0941556e97b89ec66a33cfc |
|
BLAKE2b-256 | 0ed5a8dd8634195ff128bb00af4fb1cb76775c5aab019a64d91d2394a512c244 |
Hashes for quantile_forest-1.3.6-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85178c0438979ad72ae61fd52ccd1636e6e9e1a255e084ac851f3447b8315883 |
|
MD5 | 1f8691b38a1612324912bfd5855b8c36 |
|
BLAKE2b-256 | 82014fc99f3ae6e0ec0ea05be60cc055135224f4f48288532040a7539c1a46a1 |
Hashes for quantile_forest-1.3.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57dde345412d3b501e32f4c271413048de6c27b58d1610f1edc5c4d60f39aedf |
|
MD5 | fcfa1c5e82f5a7f57aa16500cacc6fa9 |
|
BLAKE2b-256 | 037eb247a2c7ccf155fff81e30b389d074753c031188ed5742de26afee9ebdb5 |
Hashes for quantile_forest-1.3.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f914392efb01a79fc888067d859c4e337a6c0a32dbc24e896b22c746ca8b7c |
|
MD5 | 45793e0ee864dcc774b09782b6235eb7 |
|
BLAKE2b-256 | 6b22c1d54a3d1763f01eec26bc24c1bbbe49f7ca53b6993b470d9fed40b34506 |
Hashes for quantile_forest-1.3.6-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ae190333b1beb660a4fe039050a0afe59ca96a18545ebfe68da647854ea72f |
|
MD5 | de7fe3425f33359947627a2ad15552e4 |
|
BLAKE2b-256 | d1973051c9f13e19ff26072b88ae4a55ebfcd049b185ef0cd37df91ecafda4c4 |
Hashes for quantile_forest-1.3.6-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dd32b9c9d9a0b4fee6a7777c6c2faccf0eeedf01f9fe10a86efc68b60ea64b1 |
|
MD5 | c1c9227a939f11724bafbc516c3dfe4d |
|
BLAKE2b-256 | cb665e0e64b086f6a099b226bdfa2f289e1575b7422c413048d4da43f08846f3 |