Target is multiclass but average='binary'. Please choose another average setting, one of [None, 'micro', 'macro', 'weighted'].
时间: 2024-01-22 13:02:16 浏览: 191
td_one_vs_rest_multiclass_classifier.rar_One Vs Rest
As an AI language model, I don't have the context of your specific problem. However, I can suggest that you use one of the following average settings instead of 'binary':
1. None: It will return the scores of each class.
2. micro: It calculates the total number of true positives, false negatives, and false positives across all classes, and then apply precision, recall, and f1-score metrics.
3. macro: It calculates metrics for each class individually, and then take the average (unweighted).
4. weighted: It calculates metrics for each class individually, and then take the average (weighted by the number of samples in each class).
You can choose the appropriate average setting according to your problem requirements.
阅读全文