Skip to content

Commit

Permalink
Fix formatting (#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-m-campos authored Feb 19, 2024
1 parent 946b6a3 commit 8124c5b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions notebooks/metrics_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,13 @@
"blood when the classifier predicted so or the fraction of people predicted to\n",
"have given blood out of the total population that actually did so.\n",
"\n",
"The former metric, known as the precision, is defined as TP / (TP + FP) and\n",
"The former metric, known as the precision, is defined as `TP / (TP + FP)` and\n",
"represents how likely the person actually gave blood when the classifier\n",
"predicted that they did. The latter, known as the recall, defined as TP / (TP\n",
"+ FN) and assesses how well the classifier is able to correctly identify\n",
"people who did give blood. We could, similarly to accuracy, manually compute\n",
"these values, however scikit-learn provides functions to compute these\n",
"statistics."
"predicted that they did. The latter, known as the recall, defined as\n",
"`TP / (TP + FN)` and assesses how well the classifier is able to correctly\n",
"identify people who did give blood. We could, similarly to accuracy,\n",
"manually compute these values, however scikit-learn provides functions to\n",
"compute these statistics."
]
},
{
Expand Down Expand Up @@ -664,4 +664,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
12 changes: 6 additions & 6 deletions python_scripts/metrics_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@
# blood when the classifier predicted so or the fraction of people predicted to
# have given blood out of the total population that actually did so.
#
# The former metric, known as the precision, is defined as TP / (TP + FP) and
# The former metric, known as the precision, is defined as `TP / (TP + FP)` and
# represents how likely the person actually gave blood when the classifier
# predicted that they did. The latter, known as the recall, defined as TP / (TP
# + FN) and assesses how well the classifier is able to correctly identify
# people who did give blood. We could, similarly to accuracy, manually compute
# these values, however scikit-learn provides functions to compute these
# statistics.
# predicted that they did. The latter, known as the recall, defined as
# `TP / (TP + FN)` and assesses how well the classifier is able to correctly
# identify people who did give blood. We could, similarly to accuracy,
# manually compute these values, however scikit-learn provides functions to
# compute these statistics.

# %%
from sklearn.metrics import precision_score, recall_score
Expand Down

0 comments on commit 8124c5b

Please sign in to comment.