You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is that the new factor C is converted to an NA because of fix.factors.prediction = TRUE.
As you can see in the documentation this is feature was intended for cases where the test data has less factors than the training set. However, it has the side effect that it reduces the levels to the one seen in the training and R then just sets new factor levels to NA. Maybe some learners can deal better with an NA then with an unseen factor? However this is not really intended and definitely has to go into the documentation of the fix.factors.prediction argument.
Also we might want to deal with it better. #2771 is kind of related.
The PR from Jakob provides a good approach to the problem. Most likely there is not much else we can do in such situations to account for all possible issues with missing data in prediction scenarios.
Gives
Error: Missing data in columns: B.
, although there is no missing data. Same for classification.Kind regards
The text was updated successfully, but these errors were encountered: