Skip to content

Commit 2989301

Browse files
bugfix in precision/recall computations in cls2
1 parent 65b465b commit 2989301

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/classification2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,12 +717,12 @@ acc_eq_math = Math(acc_eq_str)
717717
glue("acc_eq_math_glued", acc_eq_math)
718718
719719
prec_eq_str = r"\mathrm{precision} = \frac{\mathrm{number \; of \; correct \; positive \; predictions}}{\mathrm{total \; number \; of \; positive \; predictions}} = \frac{"
720-
prec_eq_str += str(c00) + "}{" + str(c00) + "+" + str(c01) + "} = " + str( np.round(100*c11/(c11+c01), 2))
720+
prec_eq_str += str(c11) + "}{" + str(c11) + "+" + str(c01) + "} = " + str( np.round(100*c11/(c11+c01), 2))
721721
prec_eq_math = Math(prec_eq_str)
722722
glue("prec_eq_math_glued", prec_eq_math)
723723
724724
rec_eq_str = r"\mathrm{recall} = \frac{\mathrm{number \; of \; correct \; positive \; predictions}}{\mathrm{total \; number \; of \; positive \; test \; set \; observations}} = \frac{"
725-
rec_eq_str += str(c00) + "}{" + str(c00) + "+" + str(c10) + "} = " + str( np.round(100*c11/(c11+c10), 2))
725+
rec_eq_str += str(c11) + "}{" + str(c11) + "+" + str(c10) + "} = " + str( np.round(100*c11/(c11+c10), 2))
726726
rec_eq_math = Math(rec_eq_str)
727727
glue("rec_eq_math_glued", rec_eq_math)
728728
```

0 commit comments

Comments
 (0)