Issue
How exactly is the OOB score calculated for random forest regression in scikit-Learn?
I am aware that it arises from the out-of-bag samples that are not included in the bootstrap sample, but I cannot find any specific description besides Scikit Learn: OOB Errors for Random Forests, which is specific to RandomForestClassifier
.
I have also tried doing a wider search for methodology, but the only note I could find on it was on Page 17 of these lecture notes from Duke University, which states that
An OOB prediction can be obtained in this way for each of the n observations, from which the overall OOB MSE (for a regression problem) [...] can be calculated.
Is OOB mean squared error the method that is used for random forest regression in scikit-learn?
Solution
As you can see here in the source code, the score is set in the following line:
self.oob_score_ = r2_score(y, self.oob_prediction_)
So no, it's OOB R^2.
Answered By - jprebys
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.