% Create a Random Forest classifier
rf_classifier = TreeBagger(100, X_train, y_train, 'OOBPrediction', 'On');
predicted = predict(rf_classifier, X_train);
oob_mse = immse(y_train, predicted);
disp(sprintf('Out-of-Bag Mean Square Error: %.4f', oob_mse(end)));
I am getting following error while using immse function for computing mean square error
Error using immse
Expected input number 1, A, to be one of these types:
uint8, int8, uint16, int16, uint32, int32, single, double
Instead its type was table.
Error in immse (line 28)
I am attaching the matlab code along with input file. Please suggest me how to fix this error.
Sanchit