XGBOOST with target column has categorical data and features also has categorical data

I have a huge dataset with the categorical columns in features and also my target variable is categorical.

All the values are not ordinal so I think it is best to use one hot encoding.

But I have one issue that my target variable have 90 classes so if I do one hot encoding there will be 90 columns as the target columns and it will become to much complex.

But as all the values are not ordinal can I apply one hot encoding for the features categorical columns and label encoder for the target variable?

Thanks

Topic one-hot-encoding xgboost categorical-data

Category Data Science


I don't know your dataset and your target. From my experience I can say that it is possible. In some case I applied label encoding to a categorical classes and hot encoding to the features of the dataset.

You could provide an example of your dataset and explain your target if you want a specific answer.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.