Skip to content

Commit

Permalink
bugfix in precision/recall computations in cls2
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorcampbell committed Nov 14, 2023
1 parent 65b465b commit 2989301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/classification2.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,12 +717,12 @@ acc_eq_math = Math(acc_eq_str)
glue("acc_eq_math_glued", acc_eq_math)
prec_eq_str = r"\mathrm{precision} = \frac{\mathrm{number \; of \; correct \; positive \; predictions}}{\mathrm{total \; number \; of \; positive \; predictions}} = \frac{"
prec_eq_str += str(c00) + "}{" + str(c00) + "+" + str(c01) + "} = " + str( np.round(100*c11/(c11+c01), 2))
prec_eq_str += str(c11) + "}{" + str(c11) + "+" + str(c01) + "} = " + str( np.round(100*c11/(c11+c01), 2))
prec_eq_math = Math(prec_eq_str)
glue("prec_eq_math_glued", prec_eq_math)
rec_eq_str = r"\mathrm{recall} = \frac{\mathrm{number \; of \; correct \; positive \; predictions}}{\mathrm{total \; number \; of \; positive \; test \; set \; observations}} = \frac{"
rec_eq_str += str(c00) + "}{" + str(c00) + "+" + str(c10) + "} = " + str( np.round(100*c11/(c11+c10), 2))
rec_eq_str += str(c11) + "}{" + str(c11) + "+" + str(c10) + "} = " + str( np.round(100*c11/(c11+c10), 2))
rec_eq_math = Math(rec_eq_str)
glue("rec_eq_math_glued", rec_eq_math)
```
Expand Down

0 comments on commit 2989301

Please sign in to comment.