Main Content


Set default value for predict


B = setDefaultYfit(B,Yfit)


B = setDefaultYfit(B,Yfit) sets the default prediction for ensemble B to Yfit. The default prediction must be specified as a character vector or string scalar for classification or as a numeric scalar for regression. This setting controls what predicted value CompactTreeBagger returns when no prediction is possible, for example when the predict method needs to predict for an observation which has only false values in the matrix supplied through 'UseInstanceForTree' argument.

See Also