Skip to content
Advertisement

ValueError: Invalid classes inferred from unique values of `y` in XGBoost

I’m new to the Data Science field and I’m trying to apply XGBoost in a table having 5 rows × 46 columns

and my last column is my target column.

JavaScript

and the error I’m getting is

JavaScript

Can anyone help me with the resolution?

JavaScript

Advertisement

Answer

I think you need to have the class numerotated from 0 to n-1 where n is your number of class. Try this:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement