Skip to content

Commit 394cccf

Browse files
committed
Update binary_logistic_regression_torch_with_hidden_layers.ipynb
bugfix
1 parent 1426f8a commit 394cccf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

binary_logistic_regression_torch_with_hidden_layers.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@
575575
"outputs": [],
576576
"source": [
577577
"plt.figure(figsize=(10, 10))\n",
578-
"N = 500\n",
579-
"predict_threshold = np.linspace(0, 1, N, endpoint=False)\n",
578+
"Nt = 500\n",
579+
"predict_threshold = np.linspace(0, 1, Nt, endpoint=False)\n",
580580
"TPR = np.zeros_like(predict_threshold)\n",
581581
"FPR = np.zeros_like(predict_threshold)\n",
582582
"TNR = np.zeros_like(predict_threshold)\n",
@@ -593,7 +593,7 @@
593593
" TPR[idx] = TP / (FN+TP) # recall, sensitivity, test power\n",
594594
" FNR[idx] = FN / (FN+TP) # type II error\n",
595595
" TNR[idx] = TN / (TN+FP) # specificity, selectivity\n",
596-
" if idx == N//2: # indicate 0.5 probability decision point\n",
596+
" if idx == Nt//2: # indicate 0.5 probability decision point\n",
597597
" plt.subplot(2, 2, 1)\n",
598598
" plt.text(FPR[idx], TPR[idx], '. %0.2f' % val)\n",
599599
" plt.subplot(2, 2, 2)\n",

0 commit comments

Comments
 (0)