Skip to content

Commit

Permalink
Merge pull request #248 from QuantEcon/patches
Browse files Browse the repository at this point in the history
Patches
  • Loading branch information
doctor-phil authored May 30, 2024
2 parents 298f67f + 5ef2c15 commit a1af692
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lectures/tools/classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,12 @@ could be properly detected from noise (i.e. enemy aircraft vs. noise).
def plot_roc(mod, X, y):
# predicted_probs is an N x 2 array, where N is number of observations
# and 2 is number of classes
predicted_probs = mod.predict_proba(X_test)
predicted_probs = mod.predict_proba(X)
# keep the second column, for label=1
predicted_prob1 = predicted_probs[:, 1]
fpr, tpr, _ = metrics.roc_curve(y_test, predicted_prob1)
fpr, tpr, _ = metrics.roc_curve(y, predicted_prob1)
# Plot ROC curve
fig, ax = plt.subplots()
Expand Down

2 comments on commit a1af692

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.