You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to use Tpot to get the best pipeline I am getting the following error
Invalid classes inferred from unique values of y. Expected: [0 1 2 3 4 5], got [1 2 3 4 5 6]
Context of the issue
I am using the tpot 0.12.1 version and xgboost 2.0.1 version, in place of cv I am providing StratifiedKFold( n_splits=cv_folds, shuffle=False, random_state=params["random_state"] )
My data consists of 6 classes. I am aware of that this error comes due to the different splitting each time (using stratified split), some splits do not have all the labels in both groups. How can i resolve this in tpot?
still I am getting the following error.
Invalid classes inferred from unique values of y. Expected: [0 1 2 3 4 5], got [1 2 3 4 5 6]
Note: I am using label encoding as xgboost 2.0 version does not have in built label encoding.
May I know is there a way to resolve this error?
The text was updated successfully, but these errors were encountered:
This error can happen when you have only one sample for a class. Since the stratifiedkfold doesn't repeat samples, there could be a fold without examples for a particular class. This can be solved by simply removing these classes. It can also happen if the labels are not encoded properly before TPOT.
If you can share a minimum example that reproduces the issue we can take a look
While trying to use Tpot to get the best pipeline I am getting the following error
Invalid classes inferred from unique values of y. Expected: [0 1 2 3 4 5], got [1 2 3 4 5 6]
Context of the issue
I am using the tpot 0.12.1 version and xgboost 2.0.1 version, in place of cv I am providing
StratifiedKFold( n_splits=cv_folds, shuffle=False, random_state=params["random_state"] )
My data consists of 6 classes. I am aware of that this error comes due to the different splitting each time (using stratified split), some splits do not have all the labels in both groups. How can i resolve this in tpot?
still I am getting the following error.
Invalid classes inferred from unique values of y. Expected: [0 1 2 3 4 5], got [1 2 3 4 5 6]
Note: I am using label encoding as xgboost 2.0 version does not have in built label encoding.
May I know is there a way to resolve this error?
The text was updated successfully, but these errors were encountered: