Invalid classes inferred from unique values of `y`. Expected: [0], got [800020]
时间: 2023-10-11 13:07:34 浏览: 78
This error suggests that the unique values in your target variable `y` are not what you expected. You were expecting the unique values of `y` to be `[0]`, but you got `[800020]` instead.
This could be due to several reasons:
1. Input data issue: It is possible that there is an issue with the input data for the target variable. Check the data source and ensure that it is correct.
2. Data preprocessing issue: It is possible that there is an issue with the data preprocessing steps. Check if the target variable is being preprocessed correctly.
3. Data imbalance issue: It is possible that there is an issue with the data imbalance. Check if the target variable is imbalanced and if so, try to balance the dataset using techniques such as oversampling or undersampling.
To resolve this issue, you can try the following:
1. Print out the unique values of `y` to verify that they are what you expected.
2. Check the data source and data preprocessing steps to ensure that there are no issues.
3. Use techniques such as oversampling or undersampling to balance the dataset if the target variable is imbalanced.