Skip to content
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

make_learner(fix.factors.prediction = TRUE) does not have an effect #2602

Open
pat-s opened this issue Jun 13, 2019 · 0 comments
Open

make_learner(fix.factors.prediction = TRUE) does not have an effect #2602

pat-s opened this issue Jun 13, 2019 · 0 comments

Comments

@pat-s
Copy link
Member

pat-s commented Jun 13, 2019

See this SO question: https://stackoverflow.com/questions/56553479/r-predicting-with-new-factor-levels-in-mlr-with-regr-svm-task/56587590#56587590

I did a very dirty fix in the fix-factors branch that works for this example but probably not if more factor levels in newdata have missing values.
In fact, ,fix.factors.prediction sets the missing level to NA rather than to a level existing in the training data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant