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 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 extend the forest estimators available in scikit-learn to estimate conditional quantiles. 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
california = datasets.fetch_california_housing()
X = california.data
y = california.target
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
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 Distributions
Built Distributions
Hashes for quantile_forest-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e80163b7a444330c9006dbc42fd86e08cc50fe2fe32b065711c312a08c012207 |
|
MD5 | 9bef944d43bb8c1743bc6bc8aade2f84 |
|
BLAKE2b-256 | 5a35687ddd48b88003466e44d7cff30f594e64ee2df9ca0f24d3e40bd133bcd3 |
Hashes for quantile_forest-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec0cbf11d48cf2e195a73f302051a0ca33d4e3dce9df395e6b26ac593562184c |
|
MD5 | c497ddebe22edfc7143eabbb9a9ffef5 |
|
BLAKE2b-256 | be530239093cded3f86a0120d5e0d02be8b9b11f5b0e5ae2f2209b0ea02f7b22 |
Hashes for quantile_forest-1.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6dcc628e764deec2f518dec830a5f02dc450f205fbe78c1a2416998ea64c4f2 |
|
MD5 | 5e44a821ee4bb979f7b19ab4eabeba30 |
|
BLAKE2b-256 | 389b09f23bdf81ea2aaf6582f3807287415575fb80fbda820e00c4bf241fe18c |
Hashes for quantile_forest-1.0.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3d77908dff0b6ed256cea630277d16803c569ba2de6372df4efab12e548d0fd |
|
MD5 | 433f36ed772b79a2eb7523cc34767030 |
|
BLAKE2b-256 | 62d84c53a57b8434d24997558406f886600be38a6932477589ec8868391001f4 |
Hashes for quantile_forest-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea0abb6d7fee83367c2a84ca82585dae274f6847d1be2e3766e64eca0b9c9714 |
|
MD5 | e16f73dee01389fcc062fe956ec5202d |
|
BLAKE2b-256 | 7da41d713a8c1547879f09f8b932902c371380a69d212c2fd487a761201783c5 |
Hashes for quantile_forest-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4064c3dff6ff3d8de43a33ab54832d62800a28c318aa5d88106901a071fc631 |
|
MD5 | 12056293503ad4f66c9c15ce42c7ce1e |
|
BLAKE2b-256 | fbf0df85f976416a16ebea5f67854ddfe467e1c021a7f8a5a50df47857dfc366 |
Hashes for quantile_forest-1.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f0859372d4da47204da9ea78ac82c47eabeb0e17983b54a5a0af40c494651ac |
|
MD5 | 993cc3343674b7108e42ad37de282eee |
|
BLAKE2b-256 | 30faecb1ce765ff9c3d5bc40240d6d15ba0202d1a12b0054f3be9c0224e99942 |
Hashes for quantile_forest-1.0.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6557f0d385e8345652379edb01803a587a3022aadc9bfd7638970e6333cd7041 |
|
MD5 | e7b99754ab32e91b5c6e466af1b6b35f |
|
BLAKE2b-256 | 61857b20511f5bfb8744800564f448cc4dbcbc79372ea5c396a11d556c8a8f3b |
Hashes for quantile_forest-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 903b1f77db22cefa8c72f909c3ba3897bc0a4d8f61e4c36ba11f22a135548149 |
|
MD5 | 1531a6865b179ca7c0919c869e310637 |
|
BLAKE2b-256 | 7ae5c5e08b6d17641b657989159e72f5e7e38bd2f0106c5ca98502f5a68caf5b |
Hashes for quantile_forest-1.0.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7b9a6e2616d7a33e492e5a853f145e381fd9bfe9be67ab444f3931fdfac25d0 |
|
MD5 | 6beb0a0145093793f8e94cea114a3765 |
|
BLAKE2b-256 | 355db58cf521ebf0569af1881d6685a18df7ff79078f5319f2d72690e57b2ec4 |
Hashes for quantile_forest-1.0.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66ea1856f4057dbe1da6cfacca692b0b3b70dfad6df93666754bafeb416a6221 |
|
MD5 | 88f250d20dcd3cc522512744d1ae5cc8 |
|
BLAKE2b-256 | 2c256209c0a132cc6c01a0747509ecfe714c3c13a850fd981c2a17a9dad1d12f |
Hashes for quantile_forest-1.0.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c3357ad282dea1364bc090cd0c127cc7fa6ff4257e09a161728f100c08cbb7e |
|
MD5 | 746fb3ad7941b0c17885300c443aece6 |
|
BLAKE2b-256 | b020392ec0e14b5f44e5f7c2f7449506642b8ab15e2a0e0f109210c4ba530e34 |
Hashes for quantile_forest-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeee8d8ae9fb63ec9d6e8ada163bdbd624573cea0ce0d9570a446d78a391e3af |
|
MD5 | c0202ea224c3562996e242d6a11c7b02 |
|
BLAKE2b-256 | 37a2f4ee581c74cef7aee1c972b055241b555efc50d6c7e58a66165c24a5ad0f |
Hashes for quantile_forest-1.0.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d525f71625ee46cc8cc4098e4461a02dcf2098b880453ac991b3cb7908933a44 |
|
MD5 | fa7f26dd576347d724fe4d694fb0dc04 |
|
BLAKE2b-256 | 4230290a438dfce60aa8b33a487610ff5db53098ecd6aeafeeba467bcff6aa64 |