Closed llplay closed 4 years ago
classification_evaluate.py 中注意到下面这几行代码,对于单标签的多分类问题predict_total和standard_total的值是不是一直都相等?计算出的precision和recall也是相等的,这样的指标好像没有太大意义
(precision_dict[self.MICRO_AVERAGE], recall_dict[self.MICRO_AVERAGE], fscore_dict[self.MICRO_AVERAGE]) = \ self._calculate_prf(right_total, predict_total, standard_total) return precision_dict, recall_dict, fscore_dict
微平均(Micro-average)的计算指标逻辑,precision和recall确实是相同的,这个不是错误,是微平均定义本身就是这样的。
同问,感觉计算出来的precision和recall一直都是相等,有点懵逼
classification_evaluate.py 中注意到下面这几行代码,对于单标签的多分类问题predict_total和standard_total的值是不是一直都相等?计算出的precision和recall也是相等的,这样的指标好像没有太大意义
(precision_dict[self.MICRO_AVERAGE], recall_dict[self.MICRO_AVERAGE], fscore_dict[self.MICRO_AVERAGE]) = \ self._calculate_prf(right_total, predict_total, standard_total) return precision_dict, recall_dict, fscore_dict