0

I have a multi-class classification dataset that has readings from several places, and multi-class output.

To get understanding of model performance, i am utilizing sklearn's cross-validate method.

I am also utilizing leave-one-group out as a cv technique.

for one of groups, I have one class absent. i.e, for the full dataset (pseudo-code)

y.unique()
[0,1,2,3]

and for one of the splits

y_split.unique()
[0,2,3]

when XGBClassifier tries to fit on this fold, it throws an error:

Invalid classes inferred from unique values of `y`.  Expected: [0 1 2], got [0 2 3]

Do you have any hints how I can overcome such behavior?

Apparently, I can not do much with the data - it provided as-is.

sp2006
  • 59
  • 3

0 Answers0