View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
faster perfcurve (just in case you use FPR and TPR)

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 14.2 KB File ID: #42154 Version: 1.0

faster perfcurve (just in case you use FPR and TPR)

by

 

Did you notice perfcurve is slow? This version of perfcurve is faster

| Watch this File

File Information
Description

This version is identical to the one provided by matlab with a small change if "FPR" or "TPR" are used for X and Y.
Instead of using the tedious "arrayfun" I used vector cumsum functions.

Here is a test for comparison
N = 1e5;
score = [rand(N,1); rand(N,1)-1];
label = [ones(N,1); zeros(N,1)];

tic;
perfcurve(label, score, 1);
toc
tic;
perfcurve2(label, score,1);
toc

Elapsed time is 17.614076 seconds.
Elapsed time is 0.164707 seconds.

I hope you will find it useful.

Required Products Statistics and Machine Learning Toolbox
MATLAB release MATLAB 8.0 (R2012b)
Other requirements stats toolbox
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us