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.4-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abbf23cf084e8452ce9021aeeac4fe3be6e7897713942877c97b93fa67a297b3 |
|
MD5 | e30e0148df848c8eaec5e45c35db2b77 |
|
BLAKE2b-256 | 58cfa66a54efc4ea94b3a02ed35a70c76b36fec7b7094a13e5cc71b4332a9add |
Hashes for quantile_forest-1.3.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5015c99afa62604ebee667a6ee1982f46b07396705bd3d5945198648973f70c3 |
|
MD5 | 332272230575fcde5543fc3e4aec6f3a |
|
BLAKE2b-256 | c57bc9f28f88c3a346203ea0c5bb4412bd6d9332326cc329ddb9c214015ab47c |
Hashes for quantile_forest-1.3.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8970be1496b45de768c19a59c67616fee4f59d09bd2e8c7f8e29fc95ef3edf77 |
|
MD5 | 5f114c7f2bd7d4beb2d7f2317d4a6a30 |
|
BLAKE2b-256 | 42304917f238b624b3e566cc93dbae2bf1d783d6b5a7a714cdcfc5850e2ed574 |
Hashes for quantile_forest-1.3.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d020b64c467d426ad13d57ac2e64bb952406fae52bd7d8e40d074d96da84e9d |
|
MD5 | 6b91fd99be80df3e74b7112f87650c94 |
|
BLAKE2b-256 | 96280fc9382ee2c95e657dad8d97a59695272f8ae74618a3e343af70c04ecbc1 |
Hashes for quantile_forest-1.3.4-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca28b5552d35126df966127cdb126d1c808a6ecfe1f38aaf96099bc7acd896ea |
|
MD5 | 13ad4fbfafc9b46a6382e5e2a3b6bf3d |
|
BLAKE2b-256 | fc832b9568edff65384856a6199cbabf75f01f2e9510442bee24f67ec44e6b01 |
Hashes for quantile_forest-1.3.4-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82d493cb252617a6a568c448a3266c1ac73e745c6b41e9be5667b8982feec86b |
|
MD5 | d2d9abd7213cbd9e7ebc18618772543e |
|
BLAKE2b-256 | dc0e9f08e6b2df146011e457f6234079b61421cb7233bb2faea28a8a2f31729b |
Hashes for quantile_forest-1.3.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a2f17b2bbfbf676b76ad0ca1fa60f07e837e563a72e5a221cf5555eec5f9c1e |
|
MD5 | 025c806a941086e0178f191806889b22 |
|
BLAKE2b-256 | 50c4d53b4f133d04ffa9cb3b82a02886f1b3c423c9a851167b149c61ac1e1289 |
Hashes for quantile_forest-1.3.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13b793c065524e985dad574d29ba345f563a7fa9966d99580242f4ebf5d7c421 |
|
MD5 | e90c535099883e4c109e68c58aca0498 |
|
BLAKE2b-256 | 545d0069f45de38ac516f425458d8222c32b76c5dc5cc23dcdcf7dd5bb1e4f8d |
Hashes for quantile_forest-1.3.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b62ccda8f84e8d24262fc6fea99cb3ccabb5d696ba1ca47648cb864d83533224 |
|
MD5 | 1d029a89976984236c9c7bca74189552 |
|
BLAKE2b-256 | 517ef9139769677b2615098f5ab3394060610e097c41045b4aeaafd0377d5b9d |
Hashes for quantile_forest-1.3.4-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb1d918cda389b437c10b91842b2b99aa0f7e8b49a6fb09df6b4e7c63192228 |
|
MD5 | f99456e28e927d434189da7b2cbedc7d |
|
BLAKE2b-256 | 1430b88e0923cb59768a9b393754792b7695d577646f69a8ff383a4e34ef36f8 |
Hashes for quantile_forest-1.3.4-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f0cf38507563d2a492fe4efd75c413f6c7167349311bf92256ed383addbfba5 |
|
MD5 | 0fb075833906a3485b94ba6ca6640690 |
|
BLAKE2b-256 | f35c9f8274e6f7d3336d93fef127266b8310f003ee1626969d25b22e27428a6a |
Hashes for quantile_forest-1.3.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66fb6b59683eddea46ad719a4927883af78e62c907bcff4bcfe7e74d6881ae45 |
|
MD5 | b8818f83fb7a74fd6c49affd5e9668b9 |
|
BLAKE2b-256 | fabb708ae060a8e8a6038f8bee4f345b576e478010488337fe27e276755ef073 |
Hashes for quantile_forest-1.3.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 451c3b4871788a0c66c84b8bd78adea805eb6aba9e54f080a42d6365362a4e51 |
|
MD5 | 92cde9f9df89cb6708f03b03fa7e0a8a |
|
BLAKE2b-256 | 8485448a0e46f3d3b3ba2a30c13ca1cb617fdea914b3cc517df7a01e1008b465 |
Hashes for quantile_forest-1.3.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 759ef589ea4e58bc12d95cef89deac9f8a57d69bc6b29c7a9f82ee5f12fd720f |
|
MD5 | 2d787a4a030a9cbf835a439d0ba15edb |
|
BLAKE2b-256 | 67f0b017105165f9cd034190db7fddce958e0c6a3871378b369cb0c037e139e3 |
Hashes for quantile_forest-1.3.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f3f37404c33140b733672009c22628e60c4e0ede146801b87eaf7aeff02a6e0 |
|
MD5 | 1adc7924afb2aff62c55311a241e8efe |
|
BLAKE2b-256 | 4107a52a583112a267524652d91b87f7fa4524aba536e677181cdd203405c584 |
Hashes for quantile_forest-1.3.4-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6451ca0a426f033b52ef30c987328f28a956191b34e44d5d451e85bb9e284878 |
|
MD5 | 441c87314d43bee5008d796fcb42ce37 |
|
BLAKE2b-256 | dff76d2630a60b28e0661f01b7c2bed8a2418ca5299f932ea189115aeb36b61d |
Hashes for quantile_forest-1.3.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48863c89e13a48002151db00f89e31bbf41248bbcba4ee7f55a74970ca51fc26 |
|
MD5 | 2269b5f97dbd6c78006a5c24f610fb5a |
|
BLAKE2b-256 | e463e9f63c63baf15beae7fe892c91883cf06269ad79023c44bc47dd68b13446 |
Hashes for quantile_forest-1.3.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0399be7975fcaa2b9dbcb690f45ee74eb55ac021a7f1782766c64d896419c71 |
|
MD5 | 301773d55a43a1921109636529a4c928 |
|
BLAKE2b-256 | b3fa27e1b16554c37a57df1d96c6d1662d5a82eb8f22e3f4613d5bb5798629bd |
Hashes for quantile_forest-1.3.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e927afd5b184e3c6c74798ef8e876c010c6216c8536d87615b61b8ea7b28eb18 |
|
MD5 | 86611628590a9ddbb31d2bf29eef2aaf |
|
BLAKE2b-256 | 46174b35312fe4898176b92abb5612abc6f8c4aaf7498e4edf5025fcfa9cd5c9 |
Hashes for quantile_forest-1.3.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e37695d2b77aed6652fede1cacdd0bc43d80dcd1de507c73518bd85a0ab4a1f |
|
MD5 | 6dd0700d53c9a98bf2952b560cee27b9 |
|
BLAKE2b-256 | 60d28220ebde5c6706a865fa95c5c4af621eb0667037506a1599c821d9693056 |
Hashes for quantile_forest-1.3.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 248feb121e2f5ac9cf43f1226420546363c65fc5f2f05a21e9c6d0316a63e46a |
|
MD5 | 4c946bfba3e2ad09f2759c5c886f218b |
|
BLAKE2b-256 | 3ae692150721743d19036bd8a350b81c01456487d5ed29c145872fb6876d2b16 |
Hashes for quantile_forest-1.3.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52c67b10a670ae15f5a8bff9bb889cc3f62408bf1a7fc15d7a68b8ae35840d63 |
|
MD5 | 1b7e6fb6e1aa18f91a0f010eb48ffca2 |
|
BLAKE2b-256 | 32f9abea678443fd9aaea39dece613d32279fb1b1ce0cb1e219702cf076ff3c6 |
Hashes for quantile_forest-1.3.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28ac74955afeef3a918a03b977d41897d02659e56c9635cd9ba1a826cca2b9e9 |
|
MD5 | 133b84fb6f831efcf469749292a65dee |
|
BLAKE2b-256 | 22d42acd832284e5f348f94a886f130d65e0d47f2956e1a7ce958d5f5d583a5c |
Hashes for quantile_forest-1.3.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e2003e203cbac2d07ab4e7d03afd68d2c96f0dfcc2c242e5cc4780edba79789 |
|
MD5 | f545a37f9ffedbd6aa4cd84ad5838f94 |
|
BLAKE2b-256 | 1f4d89767eed614be97c0565d9d9dafdd4c8e19c6973dd069004a9ec882698aa |
Hashes for quantile_forest-1.3.4-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac35efdeebe152a517bd5384c4f07ebe35801c9c21a9edfd23ac226d6a81a307 |
|
MD5 | fa45b9ca997b80388e598b491130eae1 |
|
BLAKE2b-256 | 97408566a17058fff08452de34a8f1fd7bb9001fa8698d7d5907a20ed131f8bf |