Skip to content
Snippets Groups Projects
Commit be26fcdf authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Fix the scale of the ROC plot in the LDA tutorial

parent 4962605b
No related branches found
No related tags found
No related merge requests found
Pipeline #41443 failed
......@@ -9,7 +9,7 @@ import bob.db.iris
import bob.learn.linear
import bob.measure
import numpy
from matplotlib import pyplot
import matplotlib.pyplot as plt
# Training is a 3-step thing
data = bob.db.iris.data()
......@@ -26,8 +26,9 @@ negatives = numpy.vstack([output["setosa"], output["versicolor"]])[:, 0]
positives = output["virginica"][:, 0]
# Plot ROC curve
bob.measure.plot.roc(negatives, positives)
pyplot.xlabel("False Virginica Acceptance (%)")
pyplot.ylabel("False Virginica Rejection (%)")
pyplot.title("ROC Curve for Virginica Classification")
pyplot.grid()
fpr, fnr = bob.measure.roc(negatives, positives, n_points=2000)
plt.plot(100 * fpr, 100 * fnr)
plt.xlabel("False Virginica Acceptance (%)")
plt.ylabel("False Virginica Rejection (%)")
plt.title("ROC Curve for Virginica Classification")
plt.grid()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment