mlr icon indicating copy to clipboard operation
mlr copied to clipboard

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

Open pat-s opened this issue 5 years ago • 0 comments

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.

pat-s avatar Jun 13 '19 19:06 pat-s