y contains previously unseen labels: 'Bhutan'
时间: 2024-06-04 17:06:11 浏览: 64
Delphi编译错误中文手册
If you are encountering the error message "y contains previously unseen labels" when working with a machine learning model, it means that the labels in your test or validation data contain values that were not present in the training data. This can happen when the new data contains categories or classes that were not represented in the original training data.
To resolve this issue, you can try retraining your model on a larger and more representative dataset that includes all possible label values. Alternatively, you can remove the unseen label values from your test or validation data before feeding it into the model. You could also consider using a more flexible model architecture that can adapt to new label values as they occur.
阅读全文