ROC - Receiver Operating Characteristics.
The ROC graphs are a useful technique for organizing classifiers and visualizing their performance. ROC graphs are commonly used in medical decision making.
YOU CAN USE THIS FUNCTION ONLY AND ONLY IF YOU HAVE A BINARY CLASSIFICATOR.
The input is a Nx2 matrix: in the first column you will put your test values (i.e. glucose blood level); in the second column you will put only 1 or 0 (i.e. 1 if the subject is diabetic; 0 if he/she is healthy).
Run rocdemo to see an example
The function computes and plots the classical ROC curve and curves for Sensitivity, Specificity and Efficiency (see the screenshot).
The function will show 6 cut-off points:
1) Max sensitivity
2) Max specificity
3) Cost effective (Sensitivity=Specificity)
4) Max Efficiency
5) Max PLR
6) Max NLR
ROC requires the Curve fitting toolbox.
Cite As
Giuseppe Cardillo (2024). ROC curve (https://github.com/dnafinder/roc), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- AI and Statistics > Statistics and Machine Learning Toolbox > Classification >
- Industries > Biotech and Pharmaceutical > ROC - AUC >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Versions that use the GitHub default branch cannot be downloaded
Version | Published | Release Notes | |
---|---|---|---|
2.0.0.0 | inputparser; table implementation, github link
|
|
|
1.33.0.0 | minor code improvements |
||
1.32.0.0 | bug fixed in output table |
||
1.31.0.0 | some little editing for verbose flag management |
||
1.30.0.0 | The curves Fitting was enhanced.
|
||
1.29.0.0 | new plots and outputs |
||
1.27.0.0 | change in description.
|
||
1.26.0.0 | running roc without arguments, it will run a demo |
||
1.25.0.0 | I added the possibility to choose if you want to use all unique values or 3<=N<all unique values as tresholds |
||
1.24.0.0 | Previously I uploaded an old version of roc.m This is the last version |
||
1.23.0.0 | Bug fixing in Cut off grabbing |
||
1.22.0.0 | Trapz correction |
||
1.20.0.0 | another little bug correction to include the points (0,0) and (1,1) |
||
1.19.0.0 | ROC requires another function of mine: partest. If it is not present on the computer, ROC will download it from FEX |
||
1.18.0.0 | The function is deeper commented |
||
1.17.0.0 | Changes in description |
||
1.16.0.0 | bug fixing in area computation after adding the points (0,0) and (1,1) as previously suggested |
||
1.15.0.0 | I modified the files according to Jens Kaftan suggestion |
||
1.14.0.0 | correction in ROC performance bounds |
||
1.13.0.0 | advancedmcode link added in description section |
||
1.12.0.0 | In my previous submission I forgot to add the demo... |
||
1.11.0.0 | improved compatibility with URocomp |
||
1.10.0.0 | According to cabrego comment, in the function output the table of cutoff points, sensibility and specificity. |
||
1.9.0.0 | New plot output |
||
1.8.0.0 | bug correction |
||
1.7.0.0 | Changes to make it compatible with uroccomp function |
||
1.6.0.0 | Mistake correction in z test computation |
||
1.5.0.0 | if mean(healthy)>mean(unhealthy) the function mirrors the curve to obtain the correct ROC curve. |
||
1.4.0.0 | Input error handling added |
||
1.3.0.0 | Test on significance of AUC added |
||
1.2.0.0 | Changes in help section |
||
1.0.0.0 |