Skip to content

Commit 61c8b4d

Browse files
committed
Tweaks
1 parent 757d809 commit 61c8b4d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

03 - Classification.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@
431431
"print(classification_report(y_test, predictions))\n",
432432
"print (\"Confusion Matrix:\\n\",cm)\n",
433433
"\n",
434+
"auc = roc_auc_score(y_test,y_scores[:,1])\n",
435+
"print('\\nAUC: ' + str(auc))\n",
436+
"\n",
434437
"# calculate ROC curve\n",
435438
"y_scores = model.predict_proba(X_test)\n",
436439
"fpr, tpr, thresholds = roc_curve(y_test, y_scores[:,1])\n",
@@ -444,7 +447,8 @@
444447
"plt.xlabel('False Positive Rate')\n",
445448
"plt.ylabel('True Positive Rate')\n",
446449
"plt.title('ROC Curve')\n",
447-
"plt.show()"
450+
"plt.show()\n",
451+
"\n"
448452
]
449453
},
450454
{
@@ -495,6 +499,8 @@
495499
"print('Accuracy: ', accuracy_score(y_test, predictions))\n",
496500
"print(classification_report(y_test, predictions))\n",
497501
"print (\"Confusion Matrix:\\n\",cm)\n",
502+
"auc = roc_auc_score(y_test,y_scores[:,1])\n",
503+
"print('\\nAUC: ' + str(auc))\n",
498504
"\n",
499505
"# calculate ROC curve\n",
500506
"y_scores = model.predict_proba(X_test)\n",

0 commit comments

Comments
 (0)