Skip to content

Commit

Permalink
Edit comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewcole33 committed May 11, 2020
1 parent ad68429 commit 3c7f35a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 11 additions & 4 deletions regression.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions regression_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def print_metric_comparisons(X, y):
training_f1.append(f1_score(y_train, y_hat_train))
testing_f1.append(f1_score(y_test, y_hat_test))

# Use subplots for scatter pltos of each metric.
# Use subplots to create a scatter plot of each of the 4 metrics.
plt.figure(figsize = (20, 10))
plt.subplot(221)
plt.title('Precision Score', fontweight = 'bold', fontsize = 30)
Expand Down Expand Up @@ -153,7 +153,7 @@ def plot_auc(model, X_train, X_test, y_train, y_test):

# Use Train False/True Positive ratios to plot receiver operating characteristic curve for training set
plt.subplot(121)
plt.plot(train_fpr, train_tpr, color = 'darkorange', lw = lw, label = 'ROC Curve')
plt.plot(train_fpr, train_tpr, color = 'red', lw = lw, label = 'ROC Curve')
# Plot positive line w/ slope = 1 for ROC-curve reference
plt.plot([0, 1], [0, 1], color='navy', lw=lw, linestyle='--')
plt.xlim([0.0, 1.0])
Expand All @@ -167,7 +167,7 @@ def plot_auc(model, X_train, X_test, y_train, y_test):

# Use Test False/True positive ratios to plot receiver operating characteristic curve for test set
plt.subplot(122)
plt.plot(test_fpr, test_tpr, color='darkorange',
plt.plot(test_fpr, test_tpr, color='red',
lw=lw, label='ROC curve')
# Plot positive line w/ slope = 1 for ROC-curve reference
plt.plot([0, 1], [0, 1], color='navy', lw=lw, linestyle='--')
Expand Down

0 comments on commit 3c7f35a

Please sign in to comment.