this functions deals with categorical variables in the test set which are not present in the training set.
1 | handle_new_test_levels(model_structure, features)
|
model_structure |
the model strucxture created by xgb |
features |
is the output of xgboost::xgb.DMatrix for the test set after combining with the levels from training set |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.