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.8-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 690a46dd6fc3a28c8736e9803a0ceb015f8c7584e5cae365a659b2149f4edf5d |
|
MD5 | e42e1a23631fdf28560d396dd6f06924 |
|
BLAKE2b-256 | ecec75d8883ad568509eddb6f69c8d909dc19f6a91583aaee6583f1c137b4f3f |
Hashes for quantile_forest-1.3.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cee980d08e4abc045bbceaef9f7beb4b47f6ca9a27b930f6478c72efd6b47f16 |
|
MD5 | 55b4bb7d710e0c93bbd4a6a496fb00bb |
|
BLAKE2b-256 | 2f1e5fb2e9de4c439fde72aa91c61611f2a1f885527d833388005077825751e5 |
Hashes for quantile_forest-1.3.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a387b74ac06789fb85b08696ead4baed36c6f2699013dc3ef5d8b862a8088d9 |
|
MD5 | bf5e27e74bfa25d0e4d568abef3612a0 |
|
BLAKE2b-256 | 36c5690e8fec3435042922138df814c5b683caaecda00ec7f98563b2404578f5 |
Hashes for quantile_forest-1.3.8-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e932e9b54114666781a55dfa2b3b48c7bc26f2d472bda207e8cdca5dbad75c8 |
|
MD5 | aeb82000d9a86a8ea92fcb278562f5b3 |
|
BLAKE2b-256 | f2e2c8b3853e14d6346c48a3b0f70aea9d9ebe6ecf100a31a33242d19784b749 |
Hashes for quantile_forest-1.3.8-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 073c01fa47cd80a2a9477e31050fc0b5b11327857bf20c4ff7c88a5dc3484de0 |
|
MD5 | 3270c6ac772a715f373a56e701bea83a |
|
BLAKE2b-256 | 42ee586999154d753b0339f013b3f25544c5c47e6f7dd621312407daced21fbf |
Hashes for quantile_forest-1.3.8-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a16145da58403d822d0e967a3450c43da8f03c695e755ea0ab6c288d988458 |
|
MD5 | a11bcb4c1f4af52f8c0887382266b46e |
|
BLAKE2b-256 | 4881cfe26cf4e4eed0becb565421536d950d1be8ce04898400c3e4b03292f486 |
Hashes for quantile_forest-1.3.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aef74fe11bc674f4656411e5f20657d2093d8cbd2914e61c82d4d760819a17a |
|
MD5 | 362461a84c2a6011d5188a727d02d6f2 |
|
BLAKE2b-256 | cedee5e449b54292ac33f43955cc6c669023699f983e00f951713ceb54b0fe6d |
Hashes for quantile_forest-1.3.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85790829b943e3e130a4f65a8683844812265d22e4dc6c36ecf5b37f7084962d |
|
MD5 | f5d78bde16b708f36a90256046efd135 |
|
BLAKE2b-256 | 9613b15a3d47663d4e5e0a7446044ea95e636de12d8b3abaa1111d3dbcdb2dbd |
Hashes for quantile_forest-1.3.8-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1ed22f588585c87d3d21a7a4978904f6f409e757d4f78ff3dd8687d7b8c3da2 |
|
MD5 | 14a0ef75bd375ce1b92d7d79adc00976 |
|
BLAKE2b-256 | 1345111c31f89b8c877d7bc3795b9cc227d094667449ec9c83dd6e3cb87ae741 |
Hashes for quantile_forest-1.3.8-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4514199a883532215791bab24c9a35f3b60f2bc3aa444575457f4e9aad101c88 |
|
MD5 | 59bbb4d1699bfdc1bea1cc37cea733b1 |
|
BLAKE2b-256 | bb3e3f4f65889a38f19dbae16a2b4f3155b93501453fca45f548706cb7717137 |
Hashes for quantile_forest-1.3.8-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dff1edb9db983599464d691e9c3e4a130906ce49ee34e00550c3235a41a0cfe1 |
|
MD5 | 97e73d0240029e04431ab049d59f2479 |
|
BLAKE2b-256 | 7c7a6c428a6f71ce65496af65a24facc65031003d5ab57c6c420cd998a6e827a |
Hashes for quantile_forest-1.3.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47622a674b9007d77b85a6145fe09d6c6461c6d4b5731d87d60a5cee79caac81 |
|
MD5 | 4362e853fdf6eca253bc1be2bd1d8935 |
|
BLAKE2b-256 | d7297aca51e8b0641d254185ae6f26889eb22373b48490d5b06e3cddc2299ef3 |
Hashes for quantile_forest-1.3.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba5d7f9f3854ea2206c1f425e6dc844d82fe11fbb570710b6ced985b60faad15 |
|
MD5 | fe3e5279d6c3295e2304e4820b508802 |
|
BLAKE2b-256 | 7a3ab1e1603f2a48f3d3602a33d94c3423c3167637ad9d5cb626c29408fa4003 |
Hashes for quantile_forest-1.3.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0093d347c1bc27dbeebd1662bb96cf8f2d63ea40704b305aeb9fa822d261ebe |
|
MD5 | f59c07d15b7beb2b5b66440b5427e31d |
|
BLAKE2b-256 | 4c3cc15b7c2e7cba9288b75ab2042272458fa5f2281c562bb2158ec3b1e30db3 |
Hashes for quantile_forest-1.3.8-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6713e4441b900386df8bc6d76f8b87b41d72c98e3ef2e8cfdd5e267c3271a81d |
|
MD5 | 2a1819a4ce7de9fa1f5a1d6fd953d09e |
|
BLAKE2b-256 | e75114c90841649044d7baa455f7e63d013a4441ed699c089018aecadbbddd66 |
Hashes for quantile_forest-1.3.8-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2606d6a4833908f3d3d3238c519f9f9ce18f15a5647a6a7e28fe2b99052d8bf |
|
MD5 | 543b80c72a04c76f1630abab136b8cae |
|
BLAKE2b-256 | 965c7eb3cb5654d25a766384f9c78dcd1a3053cc1ca881aaaaf8d7ad3bb333d3 |
Hashes for quantile_forest-1.3.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29822ff19cb2f38f2e161f9b3fc5ff05425ee9e32589f4025453c297f4a5c77c |
|
MD5 | 989cb14850210d6a4b4b15a5ceb2e7b9 |
|
BLAKE2b-256 | e7f242fe2c9a0f9ae33c44e93b45c68c578e759d999c325b5f10e0b905937ebb |
Hashes for quantile_forest-1.3.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d174f37636a1375db1c15ec3061fbf8029034f734a5c93353f05e79c408aee6a |
|
MD5 | dd4ec0f42dad9705f1d83682598d8a68 |
|
BLAKE2b-256 | 5522c20bd42befe0d93fa918b67d9e78afaeb2293ae5089cca4b819834eec570 |
Hashes for quantile_forest-1.3.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0388e853b869dd2f17ddf314f1b400c7fe5d8bf3ef02072dbf32b69b3d2f7179 |
|
MD5 | 6ea85f0a118a08263cf4186b1a1b92eb |
|
BLAKE2b-256 | a6c3dbdc483b4335e7c1b4a30c2119cea5746840627525fa983a78efc0dc6f1d |
Hashes for quantile_forest-1.3.8-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1c95ef5dd2ea863a29664bfc363bfdb3d854f0a86e9f89e631540ee6e3eac04 |
|
MD5 | c93a241785da057fb66211c00a21facc |
|
BLAKE2b-256 | 4934c2e0be5a400ae5cefe03d5c9e80686677d287ec1dfb6617bdb3b740b6e47 |
Hashes for quantile_forest-1.3.8-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba260454d878f3c88eae216327a3f825bbd0f24ea905ca6596170ddbb5964c5b |
|
MD5 | 72eda8dee317e7e2baa01f93cc1d7dae |
|
BLAKE2b-256 | 2607052d537ae43bc043cc372c414542f1b66f8f13e28b16e35856129ca77cda |
Hashes for quantile_forest-1.3.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654424f732c92bc0377d5ce75a538e592baf019150622f17464c27688582cd3c |
|
MD5 | 083201139423735f52baa64f1efc2728 |
|
BLAKE2b-256 | d3e5a6857c30cbb4b4f4d61167ecbe3d828240059f00541474e24b1da211a1bd |
Hashes for quantile_forest-1.3.8-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb51744edbaa8ef16695ac7375455bc8390e482dfd263e57ce76ad75bd5c46c2 |
|
MD5 | bd4a754c4fe91ee4274ef257cf7593fe |
|
BLAKE2b-256 | 303376d6dd47737d613473fb8d3c833cd02cfabbff04dfac36ec6e66791572d8 |
Hashes for quantile_forest-1.3.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abe87572f12cd42a8c82369850011c378b6160a93d360811ffe31d02d115331 |
|
MD5 | 7d304c217877566e0f1683fce5a6e01f |
|
BLAKE2b-256 | b653918926bfcf6821e115fe6754abebed9a2fd3e174b12a6a585b0c7c825071 |
Hashes for quantile_forest-1.3.8-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7892b34f39d175584790c4877a73625a99257782323755788dec4924d9141800 |
|
MD5 | 19137aa1b32c499207f507c0570c8e7a |
|
BLAKE2b-256 | 99a091167bbaa5d62ba5fd46814a07f916fb6bf29e5f4d8630269a4ae6c3e1db |