Code QuizIntermediate Specificity and False Positive Rate
Find the bug in functions for specificity and FPR.
Codejavascript
function fpr(FP, TN) {
return FP / (FP + TN);
}
function specificity(TN, FP) {
// specificity = of actual negatives, how many correctly rejected
return FP / (TN + FP);
}
console.log(specificity(90, 10), fpr(10, 90));What is the bug in this code?