Skip to main content

Quantile regression forests compatible with scikit-learn.

Project description

quantile-forest

PyPI - Version License GitHub Actions Codecov Code Style black DOI

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 forest regressors.

Example of fitted model predictions and prediction intervals on California housing data (code)

Quick Start

To install quantile-forest from PyPI using pip:

pip install quantile-forest

To install quantile-forest from conda-forge using conda:

conda install quantile-forest -c conda-forge

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantile_forest-1.4.1.tar.gz (486.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

quantile_forest-1.4.1-cp313-cp313-win_amd64.whl (685.4 kB view details)

Uploaded CPython 3.13Windows x86-64

quantile_forest-1.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

quantile_forest-1.4.1-cp313-cp313-macosx_11_0_arm64.whl (709.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

quantile_forest-1.4.1-cp313-cp313-macosx_10_13_x86_64.whl (718.5 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

quantile_forest-1.4.1-cp313-cp313-macosx_10_13_universal2.whl (955.1 kB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

quantile_forest-1.4.1-cp312-cp312-win_amd64.whl (685.7 kB view details)

Uploaded CPython 3.12Windows x86-64

quantile_forest-1.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

quantile_forest-1.4.1-cp312-cp312-macosx_11_0_arm64.whl (710.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

quantile_forest-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl (720.5 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

quantile_forest-1.4.1-cp312-cp312-macosx_10_13_universal2.whl (959.0 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

quantile_forest-1.4.1-cp311-cp311-win_amd64.whl (685.5 kB view details)

Uploaded CPython 3.11Windows x86-64

quantile_forest-1.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

quantile_forest-1.4.1-cp311-cp311-macosx_11_0_arm64.whl (709.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

quantile_forest-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl (717.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

quantile_forest-1.4.1-cp311-cp311-macosx_10_9_universal2.whl (955.0 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

quantile_forest-1.4.1-cp310-cp310-win_amd64.whl (685.6 kB view details)

Uploaded CPython 3.10Windows x86-64

quantile_forest-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

quantile_forest-1.4.1-cp310-cp310-macosx_11_0_arm64.whl (707.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

quantile_forest-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl (715.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

quantile_forest-1.4.1-cp310-cp310-macosx_10_9_universal2.whl (949.3 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

quantile_forest-1.4.1-cp39-cp39-win_amd64.whl (686.3 kB view details)

Uploaded CPython 3.9Windows x86-64

quantile_forest-1.4.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

quantile_forest-1.4.1-cp39-cp39-macosx_11_0_arm64.whl (707.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

quantile_forest-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl (716.1 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

quantile_forest-1.4.1-cp39-cp39-macosx_10_9_universal2.whl (950.7 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file quantile_forest-1.4.1.tar.gz.

File metadata

  • Download URL: quantile_forest-1.4.1.tar.gz
  • Upload date:
  • Size: 486.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quantile_forest-1.4.1.tar.gz
Algorithm Hash digest
SHA256 713a23c69562b7551ba4a05c22ce9d0e90db6a73d043e760b29c331cb19dc552
MD5 d8fd138f6049e736add8d95ac8cd7534
BLAKE2b-256 626e3f1493d4abcce71fdc82ed575475d3e02da7b03375129e84be2622e1532f

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fe33f6a8b63b3617568cc1254e1802a70ce3ac23897790f3be10f8db5257fe83
MD5 fb0dfce17e1fccc8eeb98500fb68bf41
BLAKE2b-256 f2bef77c6705e974b23353c43da1cd93e11fe0afc7e859c2d14f748d25cc0376

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 697c48faf52a04e7e47f97187650d16cecc9c971fe2f83d56854b4a454289f60
MD5 ad7b6205b0998e9a7de75ccce44a536f
BLAKE2b-256 4fcd6501c8c200f34a87e1e94d7ea4f1a9dc842154fbfaa0fe65f072817fbc41

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a594bd3552507beffa6ca6002143601be5defd5cc7329154f41317110f895f7a
MD5 ccd1e8c934f99678557723ff8218a3f0
BLAKE2b-256 fef10f26386bf164ede156099d18e3e4493dd21dc48e329e1be68232e5cf8b52

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 3f0436ac7622442c2995cf121e0960332e769791f3f3c7ea62363e8480803bb3
MD5 52c3a32a1fdcee4e6333459fdb25ccf0
BLAKE2b-256 4f9575f3eea1c7cc3786c1ffdf4685e79c4979a4ae6ccedfed80362c9162f0d4

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 37c2da2ab54aceacdf5292065147f40a073b13cc3844262f0f3cbd5b8a8d928e
MD5 3ea70428642d74036228675a63949701
BLAKE2b-256 3361f8ff4e348dc2d265ea97287f921b92bca265229c48be64b94756ecff4078

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b1513b039f7ea5b9467201807b41594d25ecaf088868221e2f1ddea4edeb13b8
MD5 35062b9ca431570dbc4b5ddce8bc1702
BLAKE2b-256 8b931ae45144ab80bdd8cf8e7bf983137440b1c3430516a7db340caee9b6d77d

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d402c4af3f72d21c3ca3e9dda25a68207d29ae4d34b8126bcf19fc3680ce23e0
MD5 66011bfe5261c6db34a240f9939e8d64
BLAKE2b-256 990586bbce5503c007cfeeb74068edf608c4216e570ad13c9500513f5473740c

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b67fc17c82ea85f575617f7a093f3ad8ef0dc5a159f886a9948224b98483ad8c
MD5 2e8e9f0df849eb84ea499debab82a60a
BLAKE2b-256 8dfb747bf715bfba7570f88c7c601ef3f3350eceb4ce4bf72a1d36fb9845fdd2

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c0526c117be0df98e79e1ce378968f1e1faa9ca23e08da449baa0651a52a81d1
MD5 035dbd1cf8c470f671bec409efd9d6e2
BLAKE2b-256 e3d7694d428f94b5aec95bd9bb3805b119c1845bb63e215deeeab64e60812037

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f7d4eae276928f07c13e4784842768569e92c50e93f66c1feadf85c4967b3be4
MD5 200ac64b588cf354029315cf710bffe5
BLAKE2b-256 935363c400659404b45221405f7dbdb42fb0cea4b9cae0877a567d56d760a995

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 69d39db8c434fa2aaa48716eb05774491b22d1087f2f24bfcd853b52869d01bc
MD5 36a00ae3b8803210f46ab7d046f08038
BLAKE2b-256 a8f09e375572814f44bb93caf942c0de36c483e22a0488241042536c0dc39fb6

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 443341c9047160f36464d72871da7babae04cb8092b9fd19eca86682277ee810
MD5 63c799913b3dee71dccd28c9ca49fb8f
BLAKE2b-256 022bdfca97f4b6a8c63cdc839f119719a0f68455c3b1a013711a72f63b3dd90d

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 591e12ae0356206668e2ae8f2808749600da7c587ce7819b39b97d0a7c4053d2
MD5 04295db07ec9559ccb117666d5a195da
BLAKE2b-256 ef9a47e0d2f81115ea4112f41239a669b7440bf71ad50dce92dad86be14aad86

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 da3e40acf24b60aeb1bf24f7648aeb40f984d6b9a722513e8f9bb13d7a75e1f9
MD5 a53e86c5cbe7850947f2df9b1f54b2ae
BLAKE2b-256 d4ebb9931f40427665a8bbfbbc00dfe26ecb0d8f9df08be8df6c5f20e4ae43c3

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f4d1866c694defc077ee01190d1c69c9ef4092b31c0f86e5ae7ae3098ef7b9be
MD5 2900a5a73c536d071cc93a61ce1fbd6b
BLAKE2b-256 75ccdc1d8d7a3bf1bf8eaff4d810f56970237458482f0a8e892a4d20a27d2386

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7b50b6afdc99208cb329f160e755e0449b23fea84ac55ea8602293711fa13dee
MD5 7be60302a69b5fee7874ed17b5a45cce
BLAKE2b-256 b9386b5b59a271885728ebdc4b7a7448c10c52b02477c731b49476d4abc00a4b

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 77caf1edde485a80690336f838bf8f6ddf79f4d7ba2e4881cd8d92b489a0a65c
MD5 52a5b8b393ea6626fc2f4b2397c6d15c
BLAKE2b-256 60af3ca4d3cb1da0eb65cdd71f945cd8e8bd6c7b4aec8e88f0ba6dfbfd40fac6

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 14cc91ced4ecbb4f74e5dd26659db85c2d5aa28d94193efc2ded564830126705
MD5 71ba24bfaee8c12ac9b36909c12259a6
BLAKE2b-256 2cee64ed254db04f7c746815c815fddae6e5d8005ef08aa8000e435605dbdec6

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f46955b6255a4b5502c2df7ff6a343e673f2650ef6ac536f95dfa92f9d97f78c
MD5 104ea7a00a0418adeea32866e8b1851b
BLAKE2b-256 769a61c91fc8a31a2e4187cbe0c193fbc6ff8e3b4667cdff4fd207534cc10f67

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ed3163bfe07404c1ed5732007f0d7262f9c8240e7b3c83f93f7dea3ef2d620b5
MD5 ed656dc80759979a75509e5deb7231c2
BLAKE2b-256 6f66a82136c0bc2897334beac165d57c8a6e9457cca71655a68cfe007dace7c5

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eb35810d85eb4d19f76987a2965f3fa44846337810011cbf9c62eeed73cc9dfa
MD5 543e5da1a1820d1f49aedb5439c76f14
BLAKE2b-256 15b0054b5cbf2b157de6c5f8b92f373d45076dee51565fb63306865fda96c02b

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 17ede91423ae9b06257ea5f1d623f69a0a485cb4aa03d50b7fa69a28adf8d24a
MD5 5b2d55377ba5daf8550d0b4950ea4d9e
BLAKE2b-256 1b596ffd901d616e908a0c7748d838760f59fd5e65d21930726279c629659140

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a81a7608af0c9d56dbbbb6989c03f60a661fb1db116482231932b99e6ac61bd
MD5 505319702a748ec9ea2b13021a2cec5e
BLAKE2b-256 495ff0659f1d59b486d4c38baa901041c2f5552b4b7c5114e2e3a421c47a8f55

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3ff9f3b40fe17e44eef3bc826268c4463a3c772f6acc1e48bd0eb4246cbec0f8
MD5 7b33923fa7abd456b943e98fde483def
BLAKE2b-256 d335757657fe29fc0acff31c950c1f84d58db1f7b85804668cf1d44ba53ccacd

See more details on using hashes here.

File details

Details for the file quantile_forest-1.4.1-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for quantile_forest-1.4.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 40fac2b8b167e7525e39f37ee35d13dbe53e8388df7d05d05e8899dcaf4826d3
MD5 c98b2bd1a80fee73c1f2e413531a76ea
BLAKE2b-256 efcd92b4e7c07670c28a2b97097fbaf7f3f34217b7a3bc640f4447008f7932e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page