Skip to content Skip to sidebar Skip to footer

Xgboost : The Least Populated Class In Y Has Only 1 Members, Which Is Too Few

Im using Xgboost implementation on sklearn for a kaggle's competition. However, im getting this 'warning' message : $ python Script1.py /home/sky/private/virtualenv15.0.1dev/myVE/l

Solution 1:

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.

Post a Comment for "Xgboost : The Least Populated Class In Y Has Only 1 Members, Which Is Too Few"