apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.78k stars 6.79k forks source link

metric should have TP FP TN FN Precision Recall F1 for both macro and micro versions #9588

Closed szha closed 6 years ago

szha commented 6 years ago

Related to #9587. The current logic only supports what's called "macro F1" logic where we take the mean of F1 scores for mini-batches. "micro F1" should also be supported by keeping the tp, fp, fn counts across batches. Note that these metrics share the counter logics so we should be mindful when doing oo design.

https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/metric.py

szha commented 6 years ago

We may refer to the "average" option in sklearn.metrics.f1_score.

ThomasDelteil commented 6 years ago

@szha looks like #9777 address this ? If so please consider closing.

szha commented 6 years ago

Indeed