Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

DefaultYfit property

Class: TreeBagger

Default value returned by predict and oobPredict

Description

The DefaultYfit property controls what predicted value TreeBagger returns when no prediction is possible, for example when the oobPredict method needs to predict for an observation that is in-bag for all trees in the ensemble.

For classification, you can set this property to either '' or 'MostPopular'. If you choose 'MostPopular' (default), the property value becomes the name of the most probable class in the training data.

For regression, you can set this property to any numeric scalar. The default is the mean of the response for the training data.

If you set this property to '' for classification or NaN for regression, TreeBagger excludes the in-bag observations from computation of the out-of-bagerror and margin.

Was this topic helpful?