get_prc {EGAD} | R Documentation |
The function calculates the recall and precision
get_prc(ranks, labels)
ranks |
numeric array |
labels |
binary array |
recall,precision numeric arrays
labels <- c(rep(0,10)) labels[c(1,3,5)] <- 1 scores <- 10:1 ranks <- rank(scores) prc <- get_prc(ranks, labels)