calculate precision and recall in a confusion matrix

后端 未结 4 935
孤街浪徒
孤街浪徒 2021-01-05 13:48

Suppose I have a confusion matrix as like as below. How can I calculate precision and recall?

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-05 14:27

    I don't think you need summation at last. Without summation, your method is correct; it gives precision and recall for each class.

    If you intend to calculate average precision and recall, then you have two options: micro and macro-average.

    Read more here http://scikit-learn.org/stable/auto_examples/model_selection/plot_precision_recall.html

提交回复
热议问题