# How to set weights in multi-class classification in xgboost for imbalanced data?

From this post, I know you can set scale_pos_weight for an imbalanced dataset. However, for the multi-classification problem in the imbalanced dataset, I don't quite understand how to set the weight parameter in dmatrix.

How can I use XGBoost for an imbalanced dataset in a multi-classification problem?