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.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4426a330b6db912ba4fec9e211dbd2cde65b151975722d7e9a5e23833c588d1e |
|
MD5 | 5f443cf4ff585e94c3da12a7631d9872 |
|
BLAKE2b-256 | 6aec644ce0f02bc357610ea4d9b44e5803bef63819b9097fcbb46343b8dfa753 |
Hashes for quantile_forest-1.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b4706653b1b4bbbbd31bbce269153b5ef288437e0d6f221e794a566fb35cc96 |
|
MD5 | 9ac4889ca895dce692f52d44893bb0f4 |
|
BLAKE2b-256 | 20ac305e94c1b605e670784677d1384b4be70f3b0c521666a443de93cb31ff1a |
Hashes for quantile_forest-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 909e6b1e5d8aa07a401f11d25eb1d02ac1ba6d2ae75c6560798319f97f965f35 |
|
MD5 | b0c8946feafafb1b0c1431fa49f383c5 |
|
BLAKE2b-256 | 2be2950470b3b72b51d0072a520abfc566f34a61674a7c8b49166526dec12571 |
Hashes for quantile_forest-1.3.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f2a51604c12b823c9bf4d127748cccd3b9416aaa1d64b75de48aad93c1ca98b |
|
MD5 | 2e84f283065c806ec70917d84a889c6e |
|
BLAKE2b-256 | 8ce8d382eaf70f5c55bb816948a478ae73f9e4bd715aabb212df27272d943aa9 |
Hashes for quantile_forest-1.3.0-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20ea63c44bafbf5460c1b1a04cdf866f94591be8bce3a9d5748c73fecb5842bc |
|
MD5 | 36cb91c887b991c029ff749a81f88a53 |
|
BLAKE2b-256 | 60c5e80cef5208ab71abb8bc7fc2f33faf04cf9817ecfb2ca856b0d0d0033306 |
Hashes for quantile_forest-1.3.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c32ce133e80818fb9dd57cff1955d47cf8f6b4a66b2e394a80cbcf1880e0c590 |
|
MD5 | d60b9ce1594ba849090ffce29346454d |
|
BLAKE2b-256 | b1332db3f1ba3d085a288fedb2a34a162703576bad3996373fb00a0b8f84cd23 |
Hashes for quantile_forest-1.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b29c594f27380a4b69e23bf5940fb3eb152b52ba30de107c781b330f450144c |
|
MD5 | a43268713184b5d1a6a88401743e680e |
|
BLAKE2b-256 | 76f5e5fb385949d48af48bed100adaf555e21e9562920a1e767282a408e55360 |
Hashes for quantile_forest-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 855ee65fc6b80450c142cb54d46fffd00c60ec7856f33e1b64a9acbc0adaa453 |
|
MD5 | b8d6423058baf6b9b994e5c8dee32e3d |
|
BLAKE2b-256 | 02b6235dcd0dfed4ab93e178e59ef1c1031f7d4bf673432f783dec71d6a754dd |
Hashes for quantile_forest-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10130f74447749254c9c7bcafc895f68525a1bfb665e836ba58c3f39a521dd21 |
|
MD5 | ddccabbb7a42506f1ede674183e26fa3 |
|
BLAKE2b-256 | a5fbda0d96fdb8d2a7b36a570cfcb3d2873d5777c9b4fb097ffe117ef74ad747 |
Hashes for quantile_forest-1.3.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a19369d773416aeb425e890614accda589df73580f1c3165baab12fe1dad578b |
|
MD5 | 4ead83a4477d90a6460923d0ec864479 |
|
BLAKE2b-256 | babade1a704daa448efd10dc6c2219ad84d5d038d1c8da5149625978f1303b5f |
Hashes for quantile_forest-1.3.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24934395dbddcc89dcbded29585350a15ecb6d3ab8ee6f2e2e3e105c8112e07a |
|
MD5 | 6cdd62736e4e0928b61ff64cbf55584b |
|
BLAKE2b-256 | ebba4814202c59b89e4acdea1fa9ef7530bb93f6b6fb387f56aed30d6a389e9f |
Hashes for quantile_forest-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf58f0a1732c5b224c89ce807459784596787bf15c80941d50163812d045c312 |
|
MD5 | d693527ef2faec08fc3bdc8f672624d3 |
|
BLAKE2b-256 | ee96d3aad96587f16c67ba113e31b1338176f64402feca526003e1b36455e91f |
Hashes for quantile_forest-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe2408b879e7b05b446f79662c9a6c816331fb00118cf7ed9a2a5fe45ed6b25d |
|
MD5 | 9c73955dd2f9e7ffedc03a5bc66efc1f |
|
BLAKE2b-256 | bf4a8cce7935507a7b2469213061f62b57e11345b3d750d7b59ee4a6ea8ff131 |
Hashes for quantile_forest-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b7e1418facb30cc696120d332f65220b1cceb2b648804f50f806556a6593486 |
|
MD5 | 908a95ed79a7feb7b02136e841f4708e |
|
BLAKE2b-256 | 99cb5cce19d57548512f8afae09f53d80140d91757a0884fe32d2314164e8fd7 |
Hashes for quantile_forest-1.3.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51873716e943ea6a11082380d2c1a148a69518c4cd48603724ddb36df358a7af |
|
MD5 | f0ce43f385477df01e8464188e482b0d |
|
BLAKE2b-256 | 7ec3d41d4b394bfd8f2a4e05f3f93c52b7d0f5e3fe6cdddfcb339b86f33d9373 |
Hashes for quantile_forest-1.3.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 611f26d130b83adc58136061dea6b66605be0a5e84127775f330c3a56256d841 |
|
MD5 | e6cf48515651d3c19f2d0dcd5f45d0ab |
|
BLAKE2b-256 | 60d2b0efb0a7e0439b9384dccf09eda499ad5e64302a920b130ff69336f3b061 |
Hashes for quantile_forest-1.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfe0b3d51d1ad1423cd66c3706e547ae379d7879fb239b0c05178b358bb9701a |
|
MD5 | 52eb1a02b555f0a2944325cd868ede49 |
|
BLAKE2b-256 | 9b653da594942986581d018cfe9d335f071a6eb3aa2c64e2b292bcfde917bc95 |
Hashes for quantile_forest-1.3.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 399ba95a1812429e95119d408d6ebde37bb4a84f352f07f0a06e167bc7eb33ba |
|
MD5 | 275d053922a61aea09e4a34e578f5060 |
|
BLAKE2b-256 | ec749eb1280cba5360f9a4cd6cff04bce5aaf4a3a3455286a4ff69ba4cc055b5 |
Hashes for quantile_forest-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a933384f8b8af715208b3ca0337b1789cb270cb982f23c4941064473c4fc6bf3 |
|
MD5 | 9a3c32ee0cee5bc03e1ab38cb782eef1 |
|
BLAKE2b-256 | 5f8afc1a25160fcd64199a05e8f493953f25c7c356ba0a08a4b22bed3940fa4d |
Hashes for quantile_forest-1.3.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0198c1c0c7ffd8b793b7dd42efc94aab63fd86f30db16d01f85a176d190e942 |
|
MD5 | 43fa4561bcda495a54e3fd58edaac006 |
|
BLAKE2b-256 | 3a487b8bace7144feba596275a3b1432e002fd8ac6569193c1f26970b20d4346 |
Hashes for quantile_forest-1.3.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e1f49e3b358201e0d1482959c99315a677fe06abd0e68ce63be846bcca60c2 |
|
MD5 | 5812d0d22a616cbeed87ff06388a59ca |
|
BLAKE2b-256 | e1d7d1d5fd3752943f608c096483a020ab5bc9e8bfa55812357e82877bccd5fe |
Hashes for quantile_forest-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 300bce0abad68bbc669d1f1b83d967b97db3db2e2232789d2a26abf99f7f6cf1 |
|
MD5 | 0d757b5b4652b6e9727d032e3a216c82 |
|
BLAKE2b-256 | 4a9b5969bc6beef5d8fb3f51793ab9913f26dffc7b9e9db9178b3e2eea4a83f8 |
Hashes for quantile_forest-1.3.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ee0db4a29060f02f0fec205ff17fb38ec83cc472044253c7db6dd75601a4b11 |
|
MD5 | d172d161c94d2d0287c6a004c18ca7e8 |
|
BLAKE2b-256 | 07c4b0a3ff626da62c9a7db6fb386c319563ac55548303f998cbc58081231d17 |
Hashes for quantile_forest-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d811ae90ae1c1707854356f2d6d1ee6b51b16e098e713f49bd609d5693c847 |
|
MD5 | 0e8decf6718bd6b5b10c18b567e825a8 |
|
BLAKE2b-256 | 35a68727d8cc4f148119a558d973b622be5dbd27e1a52ee63e806075db93acfe |
Hashes for quantile_forest-1.3.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 946c556570bb0e5e2a309513d2486a8e6f91533000fd3d60de2bb7c8164b507e |
|
MD5 | 1eb5683e15b9b4917086082d4a229ab5 |
|
BLAKE2b-256 | b185b6a33a05a905fb9c08049d8cd55b21c28da81e15ea54be98db3733d43eb4 |