Xgboost package in R



Please explain the purpose of having dummy variables for categorical features in R? specially when we use xgboost package?

Can we use dummy variables for another approaches like lm() and gm() and tree approaches?


Hi @norman

This is one limit of xgboost, the current implementation take numeric only. The other models you mentioned have on internal conversion, so they build dummies for you (look at the summary of the models, you will see them).

If you want a more conventional interface with category, use caret the train function will do the conversion for you
Hope this help