ML
ML copied to clipboard
xgboost with categorical variables?
Variables such as month, Weekday, Hour are all categorical variables. Why haven't you one-hot-encoded them before feeding into the xgboost classifier?
Label encoding also works fine for tree based models similar to one hot encoding.
Thank you so much for replying. I understand what you are saying. I just have a doubt that in the code where you are building the xgboost model you did not label encode, or one-hot-encode them before feeding them into the model. So a month like January has value 0 and December has value 12 which does not make any sense because month is not a quantity.