Skip to main content

Table 2 Evaluation metrics

From: Application of multi-label classification models for the diagnosis of diabetic complications

Metrics Example-based measures
Hamming Loss \({\text{Hamming - loss}}(h) = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} \frac{1}{Q}\left| {h\left( {x_{i} } \right)\Delta y_{i} } \right|\)
Accuracy \({\text{Accuracy}}(h) = \frac{1}{N}\sum\limits_{i = 1}^{N} {\left| {\frac{{h\left( {x_{i} } \right) \cap y_{i} }}{{h\left( {x_{i} } \right) \cup y_{i} }}} \right|}\)
Precision \({\text{Precision}}(h) = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} \frac{{\left| {h\left( {x_{i} } \right) \cap y_{i} } \right|}}{{\left| {y_{i} } \right|}}\)
Recall \({\text{Recall}}(h) = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} \frac{{\left| {h\left( {x_{i} } \right) \cap y_{i} } \right|}}{{\left| {h\left( {x_{i} } \right)} \right|}}\)
F1-score \(F_{1} = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} \frac{{2 \times \left| {h\left( {x_{i} } \right) \cap y_{i} } \right|}}{{\left| {h\left( {x_{i} } \right)} \right| + \left| {y_{i} } \right|}}\)
Subset Accuracy \({\text{Accuracy}}_{{{\text{sub}}}} (h) = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} I\left( {h\left( {x_{i} } \right) = y_{i} } \right)\)
Label-based Measures  
 Macro-precision \({\text{Macro - precision}} = \frac{1}{Q}\mathop \sum \limits_{j = 1}^{Q} \frac{{tp_{j} }}{{tp_{j} + fp_{j} }}\)
 Macro-recall \({\text{Macro - recall}} = \frac{1}{Q}\mathop \sum \limits_{j = 1}^{Q} \frac{{tp_{j} }}{{tp_{j} + fn_{j} }}\)
 Macro-F1-score \({\text{Macro - F1}} = \frac{1}{Q}\mathop \sum \limits_{j = 1}^{Q} \frac{{2 \times p_{j} \times r_{j} }}{{p_{j} + r_{j} }}\)
 Micro-precision \({\text{Micro - precision}} = \frac{{\mathop \sum \nolimits_{j = 1}^{Q} tp_{j} }}{{\mathop \sum \nolimits_{j = 1}^{Q} tp_{j} + \mathop \sum \nolimits_{j = 1}^{Q} fp_{j} }}\)
 Micro-recall \({\text{Micro - recall}} = \frac{{\mathop \sum \nolimits_{j = 1}^{Q} tp_{j} }}{{\mathop \sum \nolimits_{j = 1}^{Q} tp_{j} + \mathop \sum \nolimits_{j = 1}^{Q} fn_{j} }}\)
 Micro-F1-score \({\text{Micro - F1}} = \frac{{2 * {\text{micro - precision}} * {\text{micro - recall}}}}{{{\text{micro - precision}} + {\text{micro - recall}}}}\)