FUNCTION REFERENCE
perfcurve
ROC curve or other classifier performance curve.
ROC curve or other classifier performance curve.
Syntax
[X, Y, T, AUC] = perfcurve(labels, scores, posclass)Syntax
[X, Y, T, AUC] = perfcurve(labels, scores, posclass, 'XCrit', xc, 'YCrit', yc)Thresholds T are the distinct scores in descending order; at each one, observations with score >= T count as positive. The first point is the reject-all point (0,0) for the default false positive rate X and true positive rate Y. Criteria: fpr, tpr, tnr, fnr, ppv (prec), npv, accu, reca, tp, fp, tn, fn. AUC is the trapezoidal area under Y(X). Labels may be numeric, logical, text cells or categorical.
Example
[X, Y, T, AUC] = perfcurve([1 1 0 1 0]', [0.9 0.8 0.7 0.6 0.5]', 1); % AUC = 5/6Differences from MATLAB: The (0,0) point carries the largest score as its threshold; confidence bounds, weights, 'Prior', 'Cost' and other options are not supported yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.