I am using Random Forests in Matlab for regression. After educating my model on train data, I want to get MSE on test data not used in training. I do that two ways:
predictand directly calculate MSE using predicted and actual values
errorand use built in TreeBagger functionality to do the same task.
In first case I get 10 times bigger result. Why? The only explanation I have, is that built in function somehow discounts outliers in prediction, but I am not sure how exactly it is done.
Can somebody, please, explain all this to me.