Mark sandstrom
Tue Dec 22 12:24:12 2015
SUMMARY
In the example app server.R
forms a set of prediction scores [0..1] s
and corresponding true 0/1 class labels l
:
library(ROCR); data(ROCR.simple);
dr = as.data.frame(ROCR.simple)
l = dr$labels
L = length(l)
s = dr$predictions + rnorm(L)*.1 - L:1/(L*10)
s
would be produced e.g. by a machine learning algo based on observed feature values of objects to be classified.s
[0..1] for each observed object, and such scores, if > cutoff are classified into 'pos' class 1 and into 'neg' class 0 othws
w.r.t. to their true labels l
, i.e., accuracy of the classifier is thus a function of the cutoff value: