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.7-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1d7c1e5ff48d7d32322a6608267e53f97a026797d08f94b012ceba98c095580 |
|
MD5 | e8d77d9adf49aa29879e3edbb24e59e0 |
|
BLAKE2b-256 | 6b58a8072b77d205226a6f1625f18e36c50227815924f10e4c769fd5fd4915d4 |
Hashes for quantile_forest-1.3.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3789685c04e219ad7bd0d644ac9e8f4d4e0937da1803e8ca8498d45dad9fba47 |
|
MD5 | 0f9d3e57b2f7900c2144dd1553042fa7 |
|
BLAKE2b-256 | c387feff0bf6e77602cb256e09029ecabb96d38b7ffb79392d347eb07f681e25 |
Hashes for quantile_forest-1.3.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f921a638f37709b68cb160e350ef9d80a732e70ab90b199a4c69b8cba1f6069 |
|
MD5 | 305b2118e890fecee931c1ea5ca2e071 |
|
BLAKE2b-256 | 60e5d74fb443c7584451b153409a9f8e5d68451ee09075057554877f4b71ec17 |
Hashes for quantile_forest-1.3.7-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa560a3b7b29b0e4aeb8f758cf98faf09bdcdde99af17d30ed67671a9471105a |
|
MD5 | 79f195d45c6bdfcade233ea67d4fcbe7 |
|
BLAKE2b-256 | 01a906c30c2ac7a6e7a46d265222262c71fe5649aa31c0c7566ce8bbcfb57394 |
Hashes for quantile_forest-1.3.7-cp312-cp312-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f069fc41f10be3ef6e40c8ff0628d5649ff1adfaa34351d1c063733719eb07b6 |
|
MD5 | a6921deb5405c2f47046bf92fd0f2a36 |
|
BLAKE2b-256 | 2e6e3aa0e5835a5b37f1dd04c922166961b18a4876a810d1e9a069a3331282b0 |
Hashes for quantile_forest-1.3.7-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ec07a77d5354156228eb5eeb800d7ed9b92f933ce0e689d75df1d5dabef6536 |
|
MD5 | fc72182ded1b691cb500a1ec9ebb36f6 |
|
BLAKE2b-256 | 571bfb7afc5aa615a6d3bdf171b8675b0ae7c6651863324e0122028c247a449a |
Hashes for quantile_forest-1.3.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8992d61b370c3aba92fb32ae0c325cd3d4e65cad5ff18bf51c7c2e30d11bd554 |
|
MD5 | 58cce7015a03a46b3c6fba250b10b854 |
|
BLAKE2b-256 | 0bce61ce98d8b731dbe511c44c7d00e2ad50b0d0f9a1b52fa5c35cb6189110e2 |
Hashes for quantile_forest-1.3.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78e60f93b5138a44a9b33758ecde1328787f69c6807b2ff99cbda197d845e2dc |
|
MD5 | 3d6868281a42ccafbf86b5fad21c1d74 |
|
BLAKE2b-256 | 72305d9532eda2d525755d81222074305c0a84a28534dc0abba4c784487f3c22 |
Hashes for quantile_forest-1.3.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c28f2786c06d8b5d9df6c2c33750e47971a28fec384bd09b96897d51aa2ec17 |
|
MD5 | c3546eb4c9b0252a604a305a98073a23 |
|
BLAKE2b-256 | 655675a61406f56d876dc376e9a54691e2c16d240759b7ce865b3a0a70f53bce |
Hashes for quantile_forest-1.3.7-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67b2abe0ace035d13f4cbe5478783502430f0551dda6969f07ad16ad9768025a |
|
MD5 | 11a2c92ec38da5a5186c312630afc037 |
|
BLAKE2b-256 | 710e925f84825bac0fb47be1e022f63b1b7f7af51c9b9353db6244d3d7ecc5d1 |
Hashes for quantile_forest-1.3.7-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db250f099844d3affa50715793f7d7880bfcf3f07654241a70d2b246de6c377 |
|
MD5 | be95b7d09483bdf7bc736f55aa2c4098 |
|
BLAKE2b-256 | e26d65dd201cc2ccb23383f040b8e3b944f07b7f5c1853b8dd878a2a010db26b |
Hashes for quantile_forest-1.3.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47fb55fc0b38c466f38c08afc70208f992b150371fa409ec16864dc7d1d6e81f |
|
MD5 | 7dfb1c5b0dc524935743408152914443 |
|
BLAKE2b-256 | c84db4c3a3fbc1605b00bb7ead00ab78e1d9ddc099ac8e27e911d8a821b81a89 |
Hashes for quantile_forest-1.3.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e73fdc3292881a2ee13e3d28eb44decbfffd5d51fc1140d79eb188da75dd80b |
|
MD5 | 8266770633d27ff4647dbb6fcc5606f0 |
|
BLAKE2b-256 | 0da47316743e18adc3e0288a0f6937c11edfe5d39211d3a285c26a2d7a113911 |
Hashes for quantile_forest-1.3.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ffcaf437badcefa21564f103abcd93d4d888de39817bf2bda8f471914307804 |
|
MD5 | fcab0b6cd5470408e4bc46ba7b29454c |
|
BLAKE2b-256 | bef8fca69f0c70cc921d5068c368e13361096bcd3a186eea8ddab35f27e2387f |
Hashes for quantile_forest-1.3.7-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60581bc60cc1e9c945fe77514bc7a43b4c642baab2cb7fe797aab8e622134770 |
|
MD5 | 6ae2464338013e060c1bffea0b0fa743 |
|
BLAKE2b-256 | 2aa28a59df02ba21606d2bfc4b57f502274c0413aae5a87cb6413159cbe3ac02 |
Hashes for quantile_forest-1.3.7-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 164c76e3ab037bbca07db2755c89c1a59c13129a8c168283227c4f929e73f088 |
|
MD5 | ab2df3d1ea843accd2f47c67bef1e79a |
|
BLAKE2b-256 | 76b0c1eaff6e28992c075390aefb41b9cfb38a6010a75767bec671f244236034 |
Hashes for quantile_forest-1.3.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb4766236e172aac12f0d3cf3c07c190c339705c703e11733002dae900193994 |
|
MD5 | c1fa2d9d1e981a71cab8a5ad8714bc1d |
|
BLAKE2b-256 | 43db7fd5d2f196233d6dc0bd4c6f8cc76b8bcc3c8765f6fab9b864445934392e |
Hashes for quantile_forest-1.3.7-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2656e0e1bdcf760189822c248d01b3abf63df49ba816570de1cccad00c17d116 |
|
MD5 | e569a34b69284298fa3482a7ed40837c |
|
BLAKE2b-256 | 9f543ee4adccb9dd5272d9b25710285db6e4a54e371027b0c02132eb7edaf8b6 |
Hashes for quantile_forest-1.3.7-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 647129bd2c03499213d0281032d126e4bdf8c6a4967f9d1a2c7d24e1eaecf5a3 |
|
MD5 | 3a7e0553bac68bbb79b6804ec2c45b0f |
|
BLAKE2b-256 | 0e8e5a18eb18272eccd663f93283af4a981da5d3b2e5462619b54d922c412253 |
Hashes for quantile_forest-1.3.7-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4390b080a9b2f047a13e5cd8f72bca720bf93ece93ffead246662da36395328c |
|
MD5 | 96d8f999e566bc7c826d20e1ad3caa93 |
|
BLAKE2b-256 | f8ddce8127110c333e802b6a3b33e2243b568abb83a2329697901e39f5cfcbf6 |
Hashes for quantile_forest-1.3.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b48da9bb9e424c92b933e762d1ce53bf378f00cdc9f322553a32811e6a313927 |
|
MD5 | 7a7535de143a1b56f3cb64db02cfebd9 |
|
BLAKE2b-256 | 1b7e9d016f723ad8ce4834d1bf226cda21dee5104a0dcbc66ce00fb476db39d6 |
Hashes for quantile_forest-1.3.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12577d17805422d2486dd9af34bb2f8a844d89a311125f4504a222872c995808 |
|
MD5 | 72b725411d2d3c6e485087d204716841 |
|
BLAKE2b-256 | ed9fb908991b2b191b34450d2498ae774ef7e15090f85ed69c3d464c68d40c6f |
Hashes for quantile_forest-1.3.7-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36b7d44b9cf3bb018fb9879eb477ca48171bcaeb5b6d2ad1a75ea72ff3f02ffa |
|
MD5 | 3ac6e86a1bf03660f633f17584ada4a6 |
|
BLAKE2b-256 | 08bdb4a2d3233068f99edc174001e8ee24b872272da864bc66eebed758ab7dd9 |
Hashes for quantile_forest-1.3.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 259895643760327b8e01b13c28bc975260ce8012cec2d37e9f90ccdf24689e90 |
|
MD5 | 59a3e9fafa4b0f00edf34096a16acd44 |
|
BLAKE2b-256 | e4536dbc51b70c2d450f5c90d00c40a9d3dbcb9ee5f8f94ba5020d8f0d0cdb4d |
Hashes for quantile_forest-1.3.7-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9df88a72aeaffbc8e8d6596f5ff0434e204ef56fb7c1e865b37d09e8c8ab055 |
|
MD5 | af06abb68717660e4d53aafea87d511d |
|
BLAKE2b-256 | 1c19b54fe9f642635556ad0f08a2caa25a48f167a5dc71a1b174b71327554155 |