1/24
Looks like no tags are added yet.
How are TP, TN, FP and FN defined?
TP: actual positive, predicted positive. TN: actual negative, predicted negative. FP: actual negative, predicted positive. FN: actual positive, predicted negative.
What must be identified before reading a confusion matrix?
Which class is positive, which axis represents actual outcomes and which represents predictions. Do not infer meanings from a cell position alone.
What is the accuracy formula?
Accuracy = (TP + TN)/(TP + TN + FP + FN). It is the fraction of all observations classified correctly.
What is the recall or sensitivity formula?
Recall = TP/(TP + FN). Its denominator contains all actual positives; it measures the fraction of them detected.
What is the precision formula?
Precision = TP/(TP + FP). Its denominator contains all positive predictions; it measures the fraction of those predictions that are correct.
What is the specificity formula?
Specificity = TN/(TN + FP). It measures the fraction of actual negatives correctly rejected.
What is the false-positive rate formula?
FPR = FP/(FP + TN) = 1 - specificity. Its denominator contains actual negatives.
What is the false-negative rate formula?
FNR = FN/(FN + TP) = 1 - recall. Its denominator contains actual positives.
What is the F1-score formula?
F1 = 2precisionrecall/(precision + recall) = 2TP/(2TP + FP + FN). It is the harmonic mean of precision and recall; undefined denominator cases need a convention.
What is the F-beta-score formula?
Fβ = (1+β²)TP / [(1+β²)TP + β²*FN + FP]. β > 1 emphasizes recall more strongly; β = 1 gives F1.
Why can accuracy be misleading with severe class imbalance?
Predicting every observation as the majority negative class can achieve high accuracy while recall for positives is zero.
Example: TP = 40, FN = 60, FP = 30, TN = 870. Find accuracy, recall and precision.
N = 1000. Accuracy = 910/1000 = 0.91; recall = 40/100 = 0.40; precision = 40/70 ≈ 0.571.
What happens when a fixed classifier score threshold is lowered?
At least as many observations are labeled positive. Recall can increase, while false positives can also increase; precision is not guaranteed to improve.
How do a predicted probability and a predicted class differ?
A probability is a model output. A decision threshold converts it to a class; changing the threshold changes the decision policy without necessarily changing the probability model.
Under H0 = negative class, how do Type I and Type II errors map to classification?
A positive decision rejects H0. A Type I error is FP; a Type II error is FN. The mapping requires this explicit null and class coding.
Is a false negative universally more costly than a false positive?
No. Costs depend on the application. The lecturer prioritizes recall in examples where missed positives are especially consequential.
What is a simple total misclassification-cost formula?
Total cost = C_FNFN + C_FPFP, where C_FN and C_FP are the costs assigned to each kind of mistake.
What does a ROC curve plot?
True-positive rate (recall) against false-positive rate as the decision threshold varies.
What does ROC AUC measure, and what does it not establish?
It summarizes ranking discrimination over thresholds. It does not establish good probability calibration or the quality of one chosen operating threshold.
Why can a precision-recall curve be useful for rare positives?
It focuses directly on positive detection and the reliability of positive predictions, rather than allowing numerous negatives to dominate an accuracy summary.
How does precision depend on prevalence, sensitivity and false-positive rate?
Precision = rπ/[rπ + f*(1-π)], where π is prevalence, r sensitivity and f the false-positive rate.
Example: prevalence = 0.01, sensitivity = 0.90 and FPR = 0.05. What is precision?
Precision = 0.009/(0.009 + 0.0495) ≈ 0.154, or 15.4%. Good sensitivity alone does not ensure reliable positive predictions when positives are rare.
What does class-specific accuracy mean if it divides by all actual members of one class?
It is that class’s recall. For the negative class this equals specificity; it differs from overall accuracy.
Does an all-negative prediction necessarily prove a software bug?
No. It can occur with imbalanced data and a given threshold. Inspect probability scores, coding, the threshold and held-out performance before diagnosing the cause.