-
Notifications
You must be signed in to change notification settings - Fork 87
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
Error in [.data.frame
(prediction, , self$class, drop = FALSE) : undefined columns selected
#195
Comments
I came across the same issue and while I have not gone through your example in detail I guess it might be the same underlying problem. For (multiclass-?)classification tasks at some point predictions are generated in a structure where for each sample/row the probability to belong to a given class is provided in a distinct column where the column name is the class level. So if you have class levels like "1" and "0" or other syntactically non-valid strings there seems to be some magic going on under the hood which alters the class levels such that syntactically correct column names are generated. It is not as straight forward as make.names("1") which would produce "X1" because this workaround sometimes fails. The only solution I have so far is to replace any class levels with syntactically valid ones at the very beginning but I'm looking for an alternative solution as well. Maybe someone else knows one on stackoverflow |
Should work now. There was a bug that ignored the passed Btw. in such cases, you can compare the result of e.g. |
Does the fix only alter the behaviour for H2O models or will it address the same problem which I have observed with caret l random forest models? Thanks! |
Currently, the fix should only apply to model objects of class
|
You can find more background and the workaround on stackoverflow but here is the minimal working example:
I'm trying to get my head around why |
Hi, thanks for the example. There seem to be other issues as well. Regarding your valid question on why
Will reopen this issue |
There may be an error in the tutorial of this package on this website: "Interpreting Machine Learning Models with the iml Package". If we want to check the
FeatureImp
of the models, the following error appears: "Error in[.data.frame
(prediction, , self$class, drop = FALSE) : undefined columns selected", as mentioned in the title. Does any know why this error occurs? Here is a reproducible example:Created on 2022-07-26 by the reprex package (v2.0.1)
Thank you in advance!
The text was updated successfully, but these errors were encountered: