From 8124c5bf26e4ff8ef067f3f8da603126c2d9232b Mon Sep 17 00:00:00 2001 From: Daniel Campos <12107659+daniel-m-campos@users.noreply.github.com> Date: Mon, 19 Feb 2024 07:13:01 -0600 Subject: [PATCH] Fix formatting (#762) --- notebooks/metrics_classification.ipynb | 14 +++++++------- python_scripts/metrics_classification.py | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/notebooks/metrics_classification.ipynb b/notebooks/metrics_classification.ipynb index 9191bae79..5ecbabc0f 100644 --- a/notebooks/metrics_classification.ipynb +++ b/notebooks/metrics_classification.ipynb @@ -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." ] }, { @@ -664,4 +664,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/python_scripts/metrics_classification.py b/python_scripts/metrics_classification.py index a620c3612..e6304c851 100644 --- a/python_scripts/metrics_classification.py +++ b/python_scripts/metrics_classification.py @@ -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