Example MATLAB script to plot ROC curve for different classification algorithms

Example MATLAB script to plot ROC curve and compute AUC for 4 different classification algorithms
1.1K Downloads
Updated 8 Jan 2018

View License

Example MATLAB script to load data
and plot ROC curve and compute
AUC for 4 different classification
algorithms:
GLM with logistic regression
SVM
Naive Bayes
Classification trees
Usage:
matlab < plot_roc_curve_example_comparealgos.m

Adapted from
https://uk.mathworks.com/help/stats/perfcurve.html

Cite As

Dr. Soumya Banerjee (2026). Example MATLAB script to plot ROC curve for different classification algorithms (https://www.mathworks.com/matlabcentral/fileexchange/65629-example-matlab-script-to-plot-roc-curve-for-different-classification-algorithms), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on ROC - AUC in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0