Metadata-Version: 2.1
Name: quantile-forest
Version: 1.0.0
Summary: scikit-learn compatible quantile forests.
Home-page: UNKNOWN
Maintainer: Zillow Group AI Team
License: Apache License 2.0
Platform: UNKNOWN
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: cython (>=3.0a4)
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: scikit-learn (>=1.0)

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]](#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](https://zillow.github.io/quantile-forest/auto_examples/plot_quantile_regression_intervals.html#sphx-glr-auto-examples-plot-quantile-regression-intervals-py))

<img src="https://zillow.github.io/quantile-forest/_images/sphx_glr_plot_quantile_regression_intervals_001.png" height="300" />



Quick Start

-----------



Install quantile-forest from [PyPI](https://pypi.org/project/quantile-forest) using `pip`:



```bash

pip install quantile-forest

```



Usage

-----



```python

  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](https://zillow.github.io/quantile-forest).





References

----------



<a id="1">[1]</a> N. Meinshausen, "Quantile Regression Forests", Journal of Machine Learning Research, 7(Jun), 983-999, 2006. http://www.jmlr.org/papers/volume7/meinshausen06a/meinshausen06a.pdf



