Learn R Programming

crimelinkage (version 0.0.4)

getROC: Cacluate ROC like metrics.

Description

Orders scores from largest to smallest and evaluates performance for each value. This assumes an analyst will order the predicted scores and start investigating the linkage claim in this order.

Usage

getROC(f, y)

Arguments

f
predicted score for linkage
y
truth; linked=1, unlinked=0

Value

data.frame of evaluation metrics:
  • FPR - false positive rate - proportion of unlinked pairs that are incorrectly assessed as linked
  • TPR - true positive rate; recall; hit rate - proportion of all linked pairs that are correctly assessed as linked
  • PPV - positive predictive value; precision - proportion of all pairs that are predicted linked and truely are linked
  • Total - the number of cases predicted to be linked
  • TotalRate - the proportion of cases predicted to be linked
  • threshold - the score threshold that produces the results

Examples

Run this code
f = 1:10
y = rep(0:1,length=10)
getROC(f,y)

Run the code above in your browser using DataLab