Skip to content

Commit

Permalink
Fixes precision / recall percent notation
Browse files Browse the repository at this point in the history
0.95 = 95%
0.95% = 0.0095
  • Loading branch information
nbgraham authored Jan 22, 2018
1 parent 9f53eed commit 02c9887
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 03_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4659,8 +4659,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Precision: 0.95%\n",
"Recall: 0.98%\n"
"Precision: 95%\n",
"Recall: 98%\n"
]
}
],
Expand All @@ -4674,8 +4674,8 @@
"\n",
"y_pred = log_clf.predict(X_test_transformed)\n",
"\n",
"print(\"Precision: {:.2f}%\".format(precision_score(y_test, y_pred)))\n",
"print(\"Recall: {:.2f}%\".format(recall_score(y_test, y_pred)))"
"print(\"Precision: {:.2f}%\".format(100 * precision_score(y_test, y_pred)))\n",
"print(\"Recall: {:.2f}%\".format(100 * recall_score(y_test, y_pred)))"
]
}
],
Expand Down

0 comments on commit 02c9887

Please sign in to comment.