Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting #762

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading