Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWrong OOB estimates with cforest method #351
Comments
|
so all we mistakenly used it ? On Wed, Jan 13, 2016 at 7:56 AM, Alexis Sarda notifications@github.com
|
|
Wow, nice catch. I'll remove the second argument. In the meantime, you can just redefine the |
|
Please test when you have the time |
|
Yes, that fixes it for me at least |
|
I should also point out that the I see you've taken that into account during training, but be aware that if you use |
This is a tricky one, and it took me a while to figure it out.
When using
"oob"as training method, the default function to obtain Accuracy and Kappa is the following:The second argument to
predictis thenewdataparameter. This should be ok, sincex@data@get("input")just loads the input data. However, looking at the source code from thepartypackage, I realized that the call to the actual prediction function (which is a C function) does the boolean operationOOB && is.null(newdata)to determine which output to give. Therefore, the only way to get the true OOB estimate is by calling thepredictgeneric withnewdata = NULL, which is the default when calling the function aspredict(x, OOB = TRUE)...I realized I was getting OOB Accuracy estimates that were much larger than the one for
finalModel, and this is the reason.Proof: