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