View source: R/remove_missing_levels.R
remove_missing_levels | R Documentation |
Accounts for missing factor levels present only in test data but not in train data by setting values to NA
remove_missing_levels(fit, test_data)
fit |
fitted model on training data |
test_data |
data to make predictions for |
data.frame with matching factor levels to fitted model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.