Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv::ml::rtrees oob error

Hi

I'm using cv::ml::rtrees and am looking to access the out-of-bag error. Is there a way to access this in code (i.e. access some variable or call a getter that provides this value)? I know that this value gets written to file on calling write from the model (this variable is part of DTreesImplForRTrees which is inaccessible). How can I access it without having to call write?

Somewhat related question: cv::ml::statmodel also has a method call CalcError which is inherited by rtrees. Calling this method, however, gives an error which is different (as far as I can see) from the oob error. I wonder if anyone has any input in clarifying how this is calculated. I have looked at the code and it seems to be general code for all classifiers (not specific to rtrees, so no equivalent to oob error). If after running training I set test=false while calling CalcError, I get an error different from 0, even though I am running it on the training data set and have not set any splits for training. Should this error not be 0?

Thanks