How can I draw an ROC curve based on the output from results = model.evaluate(test_data)
It would be nice to have a function to draw ROC curves.
Hi @johnyquest7 , thanks for your question
Theoretically, TC's visualization tool should allow you to plot the ROC by using the tc.show() function:
turicreate.show(ev['roc_curve']['fpr'], ev['roc_curve']['tpr'])
However, as mentioned in https://github.com/apple/turicreate/issues/142, it's not yet possible to request a specific plot type (a scatter plot in this case) - so sadly the plot won't show correctly for the moment.
The quickest workaround is to use matplotlib:
import matplotlib.pyplot as plt
plt.scatter(ev['roc_curve']['fpr'], ev['roc_curve']['tpr'])
If you're using Jupyter notebooks, you can add %matplotlib inline after importing matplotlib, this will make the drawing appear within the notebook.
Tagging as an enhancement. We should consider adding out-of-the-box capability to plot ROC curves.
Hi,
how can I draw multiple-class with different colour based on ROC Curve? I'm using matplotlib here
```plt.figure()
plt.plot(results['roc_curve']['fpr'],
results['roc_curve']['tpr'],
color ='cornflowerblue',
label='ROC Curve class (area = %0.2f)' %results['auc'])
plt.plot([0, 1], [0, 1], color='navy', linestyle='--')
plt.xlim([0.0, 1.0])
plt.ylim([0.0, 1.05])
plt.xlabel('False Positive Rate')
plt.ylabel('True Positive Rate')
plt.legend(loc="lower right")
plt.title('ROC curve')
plt.show()
This Function should be an adding out-of-the-box capability,I begin use the TuriCreate As a GraphLab User锛孖 want to find a Equivalent Function such as
model.show(view='Evaluation') # this is the old
turicreate.visualization.roc(model=model) # I think the new function
Is there an equivalent for model.show(view='Evaluation') to plot roc curves?
Is there an equivalent for
model.show(view='Evaluation')to plot roc curves?
Sound like you want turicreate.evaluation.roc_curve.
Is there an equivalent for
model.show(view='Evaluation')to plot roc curves?Sound like you want turicreate.evaluation.roc_curve.
Do you have any idea on how to visualize it?
Most helpful comment
Hi @johnyquest7 , thanks for your question
Theoretically, TC's visualization tool should allow you to plot the ROC by using the
tc.show()function:However, as mentioned in https://github.com/apple/turicreate/issues/142, it's not yet possible to request a specific plot type (a scatter plot in this case) - so sadly the plot won't show correctly for the moment.
The quickest workaround is to use
matplotlib:If you're using Jupyter notebooks, you can add
%matplotlib inlineafter importingmatplotlib, this will make the drawing appear within the notebook.