Fix formatting of equations in metric_template_1.py
Browse files- metric_template_1.py +3 -3
metric_template_1.py
CHANGED
@@ -52,13 +52,13 @@ as $G$ and $D$ is not.
|
|
52 |
The features described are accomplished by pairing hierarchical variants of precision ($hP$) and recall ($hR$) to form a hierarchical F1 ($hF_β$) score where each sample belongs not only to its class (e.g., a unit group level code), but also to all ancestors of the class in a hierarchical graph (i.e., the minor, sub-major, and major group level codes).
|
53 |
|
54 |
Hierarchical precision can be computed with:
|
55 |
-
|
56 |
|
57 |
Hierarchical recall can be computed with:
|
58 |
-
|
59 |
|
60 |
Combining the two values $hP$ and $hR$ into one hF-measure:
|
61 |
-
hF_β = \frac{(β^2 + 1) · hP · hR}{(β^2 · hP + hR)}, β ∈ [0, +∞)
|
62 |
|
63 |
Note:
|
64 |
**TP**: True positive
|
|
|
52 |
The features described are accomplished by pairing hierarchical variants of precision ($hP$) and recall ($hR$) to form a hierarchical F1 ($hF_β$) score where each sample belongs not only to its class (e.g., a unit group level code), but also to all ancestors of the class in a hierarchical graph (i.e., the minor, sub-major, and major group level codes).
|
53 |
|
54 |
Hierarchical precision can be computed with:
|
55 |
+
`$hP = \frac{| \v{C}_i ∩ \v{C}^′_i|} {|\v{C}^′_i |} = \frac{1}{2}$`
|
56 |
|
57 |
Hierarchical recall can be computed with:
|
58 |
+
`$hR = \frac{| \v{C}_i ∩ \v{C}^′_i|} {|\v{C}_i |} = \frac{1}{2}$`
|
59 |
|
60 |
Combining the two values $hP$ and $hR$ into one hF-measure:
|
61 |
+
`$hF_β = \frac{(β^2 + 1) · hP · hR}{(β^2 · hP + hR)}, β ∈ [0, +∞)$`
|
62 |
|
63 |
Note:
|
64 |
**TP**: True positive
|