tpot icon indicating copy to clipboard operation
tpot copied to clipboard

Title: ValueError: Invalid classes inferred from unique values of y in TPOT with XGBoost

Open kirane61 opened this issue 8 months ago • 1 comments

Context of the issue

I'm encountering an issue while using TPOTClassifier with XGBoost where I receive a ValueError indicating invalid classes inferred from the unique values of y. The expected classes are [0 1 2 3 4 5 6 7 8 9], but the classes I have are [0 1 2 3 4 5 6 7 9 10]. Despite using stratified K-fold splits for cross-validation, one of the classes is missing.

I am using Tpot version 0.12.1. The dataset has 10 classes. Since Xgboost required the labels to be encoded, I have label them from 0 to 9. When I input this data into the Tpot, I am getting the following error: This error appears only when there is slightly large data. For the dataset with a smaller number of rows (~2k), it is working fine. 

Is there any possible workaround to overcome this issue?

kirane61 avatar Jun 08 '24 18:06 kirane61