【ValueError: Target is multiclass but average=‘binary‘. Please choose another average setting, one 】
完整报错为:ValueError:Targetismulticlassbutaverage='binary'.Pleasechooseanotheraveragesetting,oneof[None,'micro','macro','weighted'].解决方法对于多分类任务,将fromsklearn.metricsimportf1_scoref1_score(y_test,y_pred)改为: