I have trained a random forest for binary classification via TreeBagger
:
Mdl = TreeBagger(trees, X1, y1, 'NumPredictorsToSample', features, ...
'OOBPrediction', 'on', 'Method', 'classification', 'OOBVarImp', 'on');
I am trying to return the error (misclassification probability) of the training set (X1
):
train_error = error(Mdl, X1, y1)
However, I receive this error message:
Function 'subsindex' is not defined for values of class 'TreeBagger'.
Note that I am not looking for the out-of-bag error; I have already obtained that without problem.