I’m plotting ROC curve with plot_roc_curve
of scikit-learn
, that plot legends are printed automatically. Is there a way to change them?
JavaScript
x
2
1
metrics.plot_roc_curve(classifier, X_test, y_test, ax=plt.gca())
2
Advertisement
Answer
You can pretty much add anything you like to the plot object that is produced through plot_roc_curve
. For instance, you can do something like this:
JavaScript
1
5
1
plot_roc_curve(classifier, X_test, y_test, ax=plt.gca(), label="Legend")
2
plt.xlabel("Your x label text")
3
plt.ylabel("Your y label text")
4
plt.title("Some title")
5
This will return: