XgBoost : The least populated class in y has only 1 members, which is too few

前端 未结 1 2025
广开言路
广开言路 2021-01-18 12:33

Im using Xgboost implementation on sklearn for a kaggle\'s competition. However, im getting this \'warning\' message :

$ python Script1.py /home/sky/private/virtuale

相关标签:
1条回答
  • 2021-01-18 13:29

    If you have a target/class with only one sample, thats too few for any model. What you can do is get another dataset, preferably as balanced as possible, since most models behave better in balanced sets.

    If you cannot have another dataset, you will have to play with what you have. I would suggest you remove the sample that has the lonely target. So you will have a model which does not cover that target. If that does not fit you requirements, you need a new dataset.

    0 讨论(0)
提交回复
热议问题