# Quantile Random Forest in Julia?

**URL:** <https://discourse.julialang.org/t/quantile-random-forest-in-julia/133383>\
**Category:** Machine Learning\
**Tags:** regression, mlj, decision-trees\
**Created:** [October 23, 2025, 1:00pm UTC](https://discourse.julialang.org/t/quantile-random-forest-in-julia/133383 "2025-10-23T13:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![allixender](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allixender/32/219003_2.png) [@allixender](https://discourse.julialang.org/u/allixender)\
**Post date:** [October 23, 2025, 1:00pm UTC](https://discourse.julialang.org/t/quantile-random-forest-in-julia/133383/1 "2025-10-23T13:00:01Z")

</div>

Hi there,  
I have played a bit with DecisionTree.jl and MJL.jl.  
Now I would like to get some uncertainty quantification for my RandomForest regressions. I have seen that Quantile Random Forest is an increasingly accepted method to get the prediction intervals 5%-95% percentiles over the learner trees instead of only the mean like in standard RF regression. Does someone have a pointer how to go about this in Julia? There are some Python implementations I am aware of like:

- [sklearn-quantile · PyPI](https://pypi.org/project/sklearn-quantile/)
- [Quantile Regression Forests - Scikit-garden](https://scikit-garden.github.io/examples/QuantileRegressionForests/)
- [GitHub - zillow/quantile-forest: Quantile Regression Forests compatible with scikit-learn.](https://github.com/zillow/quantile-forest)

I don’t think that I am skilled enough to port these myself, but I’d be happy to help in some way.

---

<div class="post-metadata">

**Author:** ![jeremiedb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeremiedb/32/29150_2.png) [@jeremiedb](https://discourse.julialang.org/u/jeremiedb)\
**Post date:** [November 12, 2025, 4:42am UTC](https://discourse.julialang.org/t/quantile-random-forest-in-julia/133383/2 "2025-11-12T04:42:11Z")

</div>

In [EvoTrees.jl](https://github.com/Evovest/EvoTrees.jl), Quantile is a support regression loss type. There’s a minimal example in the docs:

> **[Internal API · EvoTrees.jl](https://evovest.github.io/EvoTrees.jl/dev/tutorials/examples-API/#Quantile-Regression)**
>
> Documentation for EvoTrees.jl.

EvoTrees.jl however is primarily a gradient boosted trees, so each tree learn on top of the residuals of previous trees. In practice, it typically performs as good if not better than random forest.

There’s the (undocumented) `bagging_size` kwargs than can be specified in the learner to emulate a RandomForest behavior. This however doesn’t work well for some loss function, which I believe is the case for Quantile loss.

You could also consider conformal predictions to build confidence intervals in a more data-driven way: [GitHub - JuliaTrustworthyAI/ConformalPrediction.jl: Predictive Uncertainty Quantification through Conformal Prediction for Machine Learning models trained in MLJ.](https://github.com/JuliaTrustworthyAI/ConformalPrediction.jl)
