-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong 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
predict
is thenewdata
parameter. This should be ok, sincex@data@get("input")
just loads the input data. However, looking at the source code from theparty
package, 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 thepredict
generic 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:
The text was updated successfully, but these errors were encountered: