Skip to content

Commit 90712bb

Browse files
committed
Update binary_logistic_regression_manual.ipynb
curves interpretation improved
1 parent 1154726 commit 90712bb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

binary_logistic_regression_manual.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -694,12 +694,13 @@
694694
"# receiver operating characteristic (ROC) curve:\n",
695695
"plt.subplot(2, 2, 1)\n",
696696
"plt.plot(FPR, TPR, lw=2) # TN ok, FP ok, FN ok, TP ok\n",
697-
"plt.plot(0.05, 0.95, 'C3x'),\n",
697+
"plt.plot(0.05, 0.95, 'C3x', label='5%, 95% target'),\n",
698698
"plt.plot([0, 1], [0, 1])\n",
699699
"plt.text(0.05, 0.7, 'ROC curve')\n",
700700
"plt.xlabel('FPR = type I error')\n",
701701
"plt.ylabel('TPR = recall = sensitivity = power')\n",
702702
"plt.grid(True)\n",
703+
"plt.legend()\n",
703704
"plt.axis([0, 1, 0, 1])\n",
704705
"\n",
705706
"plt.subplot(2, 2, 2)\n",
@@ -737,11 +738,9 @@
737738
"source": [
738739
"We see that the model is highly balanced w.r.t. the {0,1}-class predictions.\n",
739740
"\n",
740-
"The model performs with a type-I error less than 5% and with a type-II error less than 5%.\n",
741+
"Using the typical 50% decision boundary, the trained model almost ideally performs with 5% / 95% power on the unseen test data.\n",
741742
"\n",
742-
"The model performs with a true positive rate (TPR) larger than 95% and with a true negative rate (TNR) larger than 95%.\n",
743-
"\n",
744-
"In medical applications (cf. COVID-19 testing) type-I and type-II percentages are typically even smaller; and thus TPR and TNR percentages are typically even larger."
743+
"In medical applications (cf. COVID-19 testing) type-I and type-II errors are typically smaller, and TPR / TNR larger."
745744
]
746745
},
747746
{

0 commit comments

Comments
 (0)