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.5-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 480bcae6859d32e3660951101396f1cfe19ef1889774815817598c5adb4ffd89 |
|
MD5 | eb0dc83f0e90f0042bc76ab0ee20672a |
|
BLAKE2b-256 | a8d984a4ba146159065d9bc67d3853a4196d4ef90d680242ab1e0b3b4ba2dcfa |
Hashes for quantile_forest-1.3.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e513b48d841cab9d1c087b014d9c41f2050378bf922969ce01a093b1d62bdea6 |
|
MD5 | 69659f273fc41bc920aeee258cf16174 |
|
BLAKE2b-256 | 564fbfb6b97276e278f2c121ae23bfea7849b41deca81ea5b2effdefd91df9fb |
Hashes for quantile_forest-1.3.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c000a4b999f8fd7ff3a8cfa463e27c3723b03fa2232ddbea3c5d1396e8664b9 |
|
MD5 | 1388408d06caf573bd8a5b41a05f8f65 |
|
BLAKE2b-256 | a0305cc0086f0e724ed087aa9bc35312138df69f5b8be0005a84850821f39ddf |
Hashes for quantile_forest-1.3.5-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e14959713d5fe22a9d5f2c00a7df45832dd50fa798bdae3ede047c5c507df2e9 |
|
MD5 | 0eb4edb3c0fd56b82b86f5f3d65a0b07 |
|
BLAKE2b-256 | b2e69377d44c29dd3c46526e8cea22069ef8f71f6a44343befcf832226cd7712 |
Hashes for quantile_forest-1.3.5-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9954742438b4eb0e2ec0899dd5395fb899442f630e1d8d74431f5ec047ef519 |
|
MD5 | d64e6e830b4914774864161ae987f4ac |
|
BLAKE2b-256 | 566b81019bdb432293405e1a2cd10bea95fe17df787d7c687bc55bd56d62edf5 |
Hashes for quantile_forest-1.3.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d07ca087fa3d2ee5b72d03dc683642b406bbc402074a0f49fb4c04cbe034ddde |
|
MD5 | 55935a71535b206aefad520db73e2f7f |
|
BLAKE2b-256 | e40f3eb03c38899a4ff73c9f7c1c5c3ac58bc9d2d3edd2fb9fbcc3fe02184e35 |
Hashes for quantile_forest-1.3.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abdf0a38622292acc50a407375e5129052c0a96d0fdf25546fc4de1cc3227e07 |
|
MD5 | 7e314aaa49c7dfbe808ca0aeb4e71091 |
|
BLAKE2b-256 | acdffce6f8c2e4553a16d2cfcde752c44c20a9e2bf69b167a29089a5a3825095 |
Hashes for quantile_forest-1.3.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e094c1a69a2bc76d9b58e961f9cbc228e4959c4ced220465e1f276d3adb2851b |
|
MD5 | 0b3cbfb09261f227f23a2ebb0547bbab |
|
BLAKE2b-256 | ea64dc35f56dc30eaf17af987bcf5d563a29670b150e7873db892e65b29de686 |
Hashes for quantile_forest-1.3.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 002eb04a7cac5e3d34efd8b10b48964143e78f6e31591e6a38eccc2bc0922048 |
|
MD5 | ea7ff681a222522cfe6345a9ff704c3d |
|
BLAKE2b-256 | 70af523541e1481b206277950260a676be34e7fa3e13e17aec61cb8aa821fc96 |
Hashes for quantile_forest-1.3.5-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb281028c17dde96d2a7591b21aeb4ab86afb8bc345f5fa3fbeba6315ec42c83 |
|
MD5 | 7e023be852858629600810c3fd7fb48d |
|
BLAKE2b-256 | 4cb98cf9b9233df51f16ad922924a60fbd18c46e9d2b1b665bef7bbf52a16e7e |
Hashes for quantile_forest-1.3.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7cfb7f91e0fc1b45c41d194f6a341a69b3da3d0c71bf4e6fac87fabdda8517 |
|
MD5 | d2a61a2bb716b2ed08e1e67a2b3d6001 |
|
BLAKE2b-256 | 581483a31a0683b3fab4880e799ae0f6680fbe62a969a856389787fc6ba1e02d |
Hashes for quantile_forest-1.3.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12c66f24300ca24ac1fb9d9706e3f7eb0a2e43e28750e836fc08d864dfa23c79 |
|
MD5 | b52f78a93963a554a0924f6d412f6730 |
|
BLAKE2b-256 | e7d1d686d69cbc345251164abbb6b10e75d21967197cdf73ea93ddc006d5ef7e |
Hashes for quantile_forest-1.3.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 758911a1b9de0d6afa3a869e4846bb5ec606a43b7d8dfbe0ae1645a7b2c4d9f8 |
|
MD5 | 0e03e7d0588d32a5369ee316c2efd1f8 |
|
BLAKE2b-256 | 2ca59ff37080618d8ac3515f7b261fb884ff523125468b7587fc9ca8c7c60adc |
Hashes for quantile_forest-1.3.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08f292bb052b5d71d00dd0e583da9491b315045fda7eeceeab1baccfd35f5302 |
|
MD5 | 1952d0c7b2bc4e5d7234187bbdc6e667 |
|
BLAKE2b-256 | 970b5c87056f09bc7081afe3a5576f90b9b248ca8624e2394e9ee5d51bcaf7ef |
Hashes for quantile_forest-1.3.5-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7735af525e251f294dc4781906e80892934daffc0248f3ef8bfb388804ecb39 |
|
MD5 | be2676b5568f4add6720af9e575f19a3 |
|
BLAKE2b-256 | 629bdb086788ca8ca47f21c2e5916e6e1e458485c0d802749efaa90ea3da6c2d |
Hashes for quantile_forest-1.3.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0fce9f83f79b9b4c17e671871ef0cbe5fadfd05e3f8acd272a75b59580b6ec4 |
|
MD5 | 9d6f33435d747b6c25b13597b80bec55 |
|
BLAKE2b-256 | fb9c930a60cf9443605b77677526f47fc7a3092121794c4991c571f7581ebfc9 |
Hashes for quantile_forest-1.3.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11db010c59c577b9cc26dd0ed1cdf34907d335d3ee44dd060609489643276eb1 |
|
MD5 | b575e94cf45038402aef224b071e276e |
|
BLAKE2b-256 | 8c547f68b01b335665bb3d540a53cbc02882d4e449dfa99934009b62a273c129 |
Hashes for quantile_forest-1.3.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37d36a686b641456605bd9c26eb6835dac6ab94fb2fe7aec165da4b15e1b7746 |
|
MD5 | 02c60dee9b9bc50410520731db3ba980 |
|
BLAKE2b-256 | ddf63a6dbb0ee493143d91c801ad65fcde689b9d7c027aef56ce5a8c25dae4fe |
Hashes for quantile_forest-1.3.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 371b3c21a27f69bcceadfb518591be8fc281a3ee737be295d4bce6e13f50e0f3 |
|
MD5 | 2bae52ab17534241039f73426841aa62 |
|
BLAKE2b-256 | 48cc84502779c9e7347e23aceb7bf89b3108c0804b354f7c182c7072d765d6a4 |
Hashes for quantile_forest-1.3.5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90b12288604bc216606a0fea917f16b5b08b48e8aca7e186e02ef488ca8a9786 |
|
MD5 | 22a4990d001180a8ec8c2259711ed3cb |
|
BLAKE2b-256 | fe95502b3cc080b036a1e000b23885824fa02509be49005305821ceb9e60e67c |
Hashes for quantile_forest-1.3.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cbd8d6fdb2233089ab129619ab59197c9c599cefaaf4d323faf66f0fcf8b292 |
|
MD5 | 790e94c006d2a81e683d28739ad197a6 |
|
BLAKE2b-256 | 5a2d732d3eff45f0e80c1cbc984103d9f1c47a523e0904d7092cc2178b88f568 |
Hashes for quantile_forest-1.3.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3a0aa962da0fb043b27b10b576fc401527a4e5b97ee627e0a7bd8c0d02b08ad |
|
MD5 | 4c49eaba3991de67dbe59dbb9b0b90c7 |
|
BLAKE2b-256 | 451fcc1e967644b9c7e8df812d9ee3ae216b914e2e2472b5663e442d9a01c3f9 |
Hashes for quantile_forest-1.3.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cda96cdc136949c195e29fb61edc9906042cfb8fe7e4d852f303de6fb91f9f96 |
|
MD5 | d31cae872a2f466ce16bbb15c7b836dd |
|
BLAKE2b-256 | 9d0e2d904933ef71fd6f1a382d1c944bb736389c64f820f375c0a2edecaa00d7 |
Hashes for quantile_forest-1.3.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c46d333d033df6596175fb917ec5cd961a2acff33d9e575bcda9b89b0ec3bcdd |
|
MD5 | eba7682a9365121759bf0073f9f1258b |
|
BLAKE2b-256 | b4f2353f84f15ebd630d58e2085105555eaf0155eb6f5c3d77d352373c446b2f |
Hashes for quantile_forest-1.3.5-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62c1806aa2af5d3b67523d392e8983471ce3e011ea14a9b6baea9b09438fed4d |
|
MD5 | 9e7b4f9659a40a0b9ea98e7d583aeaa8 |
|
BLAKE2b-256 | d70714fe1884a0ed340e0ef7b17a862b51469eceee42e1e9193518721156f679 |