Skip to content

Commit

Permalink
docs(blog): update accuracy_expr assignment
Browse files Browse the repository at this point in the history
Co-authored-by: Deepyaman Datta <[email protected]>
  • Loading branch information
IndexSeek and deepyaman authored Nov 17, 2024
1 parent d1470fe commit 180e8ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/posts/classification-metrics-on-the-backend/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fp = t.prediction.sum() - tp
fn = t.actual.sum() - tp
tn = t.actual.count() - tp - fp - fn
accuracy_expr = (tp + tn) / (tp + tn + fp + fn)
accuracy_expr = (t.actual == t.prediction).mean()
precision_expr = tp / t.prediction.sum()
recall_expr = tp / t.actual.sum()
f1_score_expr = 2 * tp / (t.actual.sum() + t.prediction.sum())
Expand Down

0 comments on commit 180e8ff

Please sign in to comment.