Main Content

**Class: **TreeBagger

Out-of-bag quantile loss of bag of regression trees

returns
half of the out-of-bag mean
absolute deviation (MAD) from comparing the true responses in `err`

= quantileError(`Mdl`

)`Mdl.Y`

to
the predicted, out-of-bag medians at `Mdl.X`

, the
predictor data, and using the bag of regression trees `Mdl`

. `Mdl`

must
be a `TreeBagger`

model
object.

uses
additional options specified by one or more `err`

= quantileError(`Mdl`

,`Name,Value`

)`Name,Value`

pair
arguments. For example, specify quantile probabilities, the error
type, or which trees to include in the quantile-regression-error estimation.

The out-of-bag ensemble error estimator is unbiased for the true ensemble error. So, to tune parameters of a random forest, estimate the out-of-bag ensemble error instead of implementing cross-validation.

[1] Breiman, L. *Random Forests.* Machine
Learning 45, pp. 5–32, 2001.

[2] Meinshausen, N. “Quantile Regression
Forests.” *Journal of Machine Learning Research*,
Vol. 7, 2006, pp. 983–999.