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.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8cdfb4ec05a0410a5348814716ba7bceffde0c0395d096887f273dd43cc8fe2 |
|
MD5 | 4570d596e902287897b27238b7faf9d5 |
|
BLAKE2b-256 | 50eb15aee5fa71a5ebb2d48406316a1a70de6667bbeec6d85879ae2f7b4d176d |
Hashes for quantile_forest-1.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5553e7f4f38dbd9e30c5ffcf871690390af2af590c52d4f5babab13346d750c4 |
|
MD5 | a798a1f655a351adaa7dc08c8bf28ce3 |
|
BLAKE2b-256 | 570c9bff98bb942570e17090315d3c45f6ca29db71b1ceb0a0ad06af08fefaaa |
Hashes for quantile_forest-1.3.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 122aa44a53603daec359c99bec12baa25786d9b8138042f184a7d4e5b04f50b7 |
|
MD5 | 42ae9052b27c99196c16eb3e3f5beb58 |
|
BLAKE2b-256 | 3acc37c7e39f2ae49f8fb41fdced06255a3ec606a18f568f49dbd8c1a020b9b7 |
Hashes for quantile_forest-1.3.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfbccf653d5354b3b92d6d0c27f73982b90b242c5a93c005dd543ec79fea7df8 |
|
MD5 | 539174ae35dca798afda9acab55de5fb |
|
BLAKE2b-256 | 8733528fe6d811ac5a733ffcc38adac7db0f853d31281cd44d898ec9b42078d9 |
Hashes for quantile_forest-1.3.3-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc8487a748203372a0b118aef07e6289ca61c18d78660959fc8ed1a69758f7ac |
|
MD5 | 726798471de9b990a94612390afd7e61 |
|
BLAKE2b-256 | abdb325ef33a33957cf0089071b7196369c48a49960c8a4951a6f76f883c05ca |
Hashes for quantile_forest-1.3.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f81e54ade0f777d8c03a2a265d8b6d724a65f7e045d4997527da60e84df4646 |
|
MD5 | 19854df90f70f005efd3e4fecfa1264b |
|
BLAKE2b-256 | 9323d255056ca6fdd4dffca1f9dca68bf860003ca6c189fa6dd77055f3f712f8 |
Hashes for quantile_forest-1.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17aab2adfde2c52e1eba3be0543156183788664003f918cb640258023117cb48 |
|
MD5 | 57b00ac922e16411e2d88c54cbfb7a96 |
|
BLAKE2b-256 | 981349284e6fe52c2fe93ef21348303f1e169bb12be7e0dbf833972231709c24 |
Hashes for quantile_forest-1.3.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53482c992219147c7e3ab9cdc49b26fdc684bff44578276d9e7e286b0169dbf8 |
|
MD5 | 93faa32a09dab851a4a217e7f6d893c1 |
|
BLAKE2b-256 | 8bbc1536034a0e6e43d7c6434a05b1357aa45daadbd98b7fbdb66217c165ff55 |
Hashes for quantile_forest-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f4296dbdddf9f0e93a72b5b0b34bd770dceafa4816b1aab4211b26e4ffaccd2 |
|
MD5 | 53b7809212fb62559fd76e2881c4f0eb |
|
BLAKE2b-256 | 2c6d9992d516c19ea08c83793c6e7193335568ad5e29a6b8a937ec6167610894 |
Hashes for quantile_forest-1.3.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9480b8d54dd2bc4b85cc37c0d942fd387c6d6c7ec6908907056a85e69a13ce03 |
|
MD5 | 4cc616d9ac5432304c190da27af412da |
|
BLAKE2b-256 | 4bdfce966a6612e583542889d236890de1455eb8ff1b1025b604658d7ab568d3 |
Hashes for quantile_forest-1.3.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c7426ec90a19ccf4e4f66f338760426a0df933d139f0f97bc5e243d3328eefd |
|
MD5 | 23d8ce5b26e51594fff88754f3a30aa9 |
|
BLAKE2b-256 | ff6a7cbf9c31ab898a586560f50be6d6daf8a52d5060fa1ad280bbae498ed501 |
Hashes for quantile_forest-1.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a45788d52f8f6b24277cad8a2e3f184f6f1cf2d53d0ff24601080fea79243755 |
|
MD5 | 77f36bba020b8bbf7242bcb57df40a2d |
|
BLAKE2b-256 | 812d11630a85005eacc353c0fa3e4ce38b53a119b153f52dd44fcba3c57c6011 |
Hashes for quantile_forest-1.3.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45324939b03f397e475bd02d35b11ddda5185e54583a3d68b07a1298fafb8620 |
|
MD5 | cdd504363f0ae323ac886e87a8bb1013 |
|
BLAKE2b-256 | 533d2101e6be47fa872bff9f9af28063181d4f011b7df1c741a6ccdd0ff38ad9 |
Hashes for quantile_forest-1.3.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c65af232aa3cd016e6ede6f13ba57bf02dcd4ea88489c0c7834f1a9149ad7005 |
|
MD5 | c6192ee34bc1387262dbeb9c1809c1f7 |
|
BLAKE2b-256 | 3a14a0102d0ba4bbfb26db367fcb3ae116ce897e39d3b9d498b53d160afe684a |
Hashes for quantile_forest-1.3.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd07bb06afc7b95b56d2e071b6be9c03ea7157b8f19e91982cac4db21c26e283 |
|
MD5 | 7e7415dadd90e312d56a16d29caf56ae |
|
BLAKE2b-256 | 4a6650b362f532b792bb747047e29682762379c2da575a0112c4e613e0e5462a |
Hashes for quantile_forest-1.3.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98e18788cb89f7a11785050524796c5895848db6f976c086f6f37adaa6a825a4 |
|
MD5 | 204dee5b0b6b965bd8fddf6715091857 |
|
BLAKE2b-256 | a6b7319a8c6af0c08e94a06ffff056caae01dff056961a84719b75465c477991 |
Hashes for quantile_forest-1.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b3219aa31fd6f505d254f6b4427522614da4da0fbf459891784825f2aa7f8e2 |
|
MD5 | 8f9d099e2a0467bfb332551f41e02613 |
|
BLAKE2b-256 | 4ed51300f2b45ecaa8610017eb278b17d43785834010199b9c3fb713d09a6e7f |
Hashes for quantile_forest-1.3.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3a9f0a2d792dff8de115c7473fda8d30bf1a2af35bd8178ebf3e8eff457736b |
|
MD5 | 486f9b827b707c651b98749ed765133f |
|
BLAKE2b-256 | a5f9f3232706eed7a1c01362eaea8f096e154fe7fa4bd53c991dc9a8814425a1 |
Hashes for quantile_forest-1.3.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 664454ebccdbd71684e9db87744121c398e2a22da10b3d15b01428c6e179d895 |
|
MD5 | 54dbf6c4c399c08fc89d54ca5c4d442d |
|
BLAKE2b-256 | ef96b611d7c46218ac99e344e49e3b324c04c45d81e00c3aa070c40aa144114f |
Hashes for quantile_forest-1.3.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c65d02ca42ba4f047aa3262b4d3b58706682662aed6371e65cf09a900db212cf |
|
MD5 | acaf440e4e657882082ad17f57ab75c0 |
|
BLAKE2b-256 | 9bdd805d212d7636243f57f59110f142f2ab3adf3c37b453731d4ced17e10165 |
Hashes for quantile_forest-1.3.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c49cd0d98a8176bbe5de2f5e4b338eabc757bb6698cf77f5044d1cd795dfd00 |
|
MD5 | c1dbc86db2998366d8ebf9f209067c7a |
|
BLAKE2b-256 | 992603f4bf00699461dfdd3c3f0136a5d9c0560b53744465bab4f0fa96135c77 |
Hashes for quantile_forest-1.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a859327069d35037702ec66ea58c854635394e7407d4fe8b26ad29772d59a5a |
|
MD5 | ea71bbc5f5d9844291768ebb1af70996 |
|
BLAKE2b-256 | 540abac4ad4b79a43093a53a5a522b69d238d8214c6a3df2cf25f72fca2f376d |
Hashes for quantile_forest-1.3.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fd25317c05392a8351f156498331050b3668289199159b905f0ea06f9c3265c |
|
MD5 | 861b0241b6721775a6f7d10a8fd6a164 |
|
BLAKE2b-256 | a8fd5d8130e708f704c05f988578ae7aeda89b306cbd3c017094e87b6bb05fca |
Hashes for quantile_forest-1.3.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 349980746ddd6711a5f37c4f8f2a8fd84a681788e234c11bc5db34cf6de4e138 |
|
MD5 | 1b70fa3bff166b7831c918ccd61d0514 |
|
BLAKE2b-256 | 1a3f2fca37bd5ad96160a15e5af04fd364648e8e3cd00d0ab70690ff46c50687 |
Hashes for quantile_forest-1.3.3-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a999b05ae5442b8322b5b7c8e149228ae46fd13d3503b0766f02c1c94141e71f |
|
MD5 | a2b88d25f877941209870017a5b8d028 |
|
BLAKE2b-256 | d221de503039388e7595124074cb633c6c06978ba6146567aa82f970bb8d2c36 |