ML Foundations

Learn / ML Foundations

ML Foundations: Performance Measures

Quiz on metric definitions, confusion matrices, composite scores, and ROC/PR evaluation based on the Performance Measures lecture outline.

Learning path

0%

0 of 11 sections marked complete · about 46 minutes

Learning objectives

What you will be able to explain

  • Which labels define the binary classification setup in the lecture?
  • Match each confusion-matrix outcome to its entry
  • Which error type corresponds to a false alarm?
  • Compute the accuracy from a confusion matrix
  • Compute balanced accuracy and balanced error
  • Compute the class-conditional rates

Section 01

Which labels define the binary classification setup in the lecture? to Which error type corresponds to a false alarm?

01

Which labels define the binary classification setup in the lecture?

The lecture starts Part 1 with binary classification and explicitly states that the two classes are positive and negative.

02

Match each confusion-matrix outcome to its entry

The confusion matrix compares predictions with true labels: TP and TN are correct predictions, while FN and FP are the two error cases.

Guided checkpoint

Match the binary classification outcome to the corresponding confusion-matrix abbreviation.

03

Which error type corresponds to a false alarm?

The lecture identifies a false alarm as a false positive, which is also called a Type I error.

Section 02

Compute the accuracy from a confusion matrix to Compute the class-conditional rates

01

Compute the accuracy from a confusion matrix

Accuracy is (TP + TN) / (P + N). Here TP = 18, TN = 24, P = 20, and N = 30, so accuracy = (18 + 24) / 50 = 0.84.

Guided checkpoint

Use the following counts and enter the accuracy as a decimal between 0 and 1.

Predicted PositivePredicted Negative
Positive label182
Negative label624

02

Compute balanced accuracy and balanced error

Balanced accuracy averages per-class accuracy: 0.5 * (TP / P + TN / N) = 0.5 * (18 / 20 + 24 / 30) = 0.85. Balanced error averages per-class error: 0.5 * (FN / P + FP / N) = 0.5 * (2 / 20 + 6 / 30) = 0.15.

Guided checkpoint

Use the same confusion matrix and enter both values as decimals between 0 and 1.

Predicted PositivePredicted Negative
Positive label182
Negative label624

03

Compute the class-conditional rates

TPR = TP / (TP + FN) = 18 / 20 = 0.9, FPR = FP / (FP + TN) = 6 / 30 = 0.2, TNR = 1 - FPR = 0.8, and FNR = 1 - TPR = 0.1.

Guided checkpoint

Using the same confusion matrix, compute TPR, FPR, TNR, and FNR as decimals.

Predicted PositivePredicted Negative
Positive label182
Negative label624

Section 03

Match each class-focused measure to its formula to Mark each statement about composite measures

01

Match each class-focused measure to its formula

The lecture defines precision and recall for the positive class, then introduces NPV and specificity as the analogous negative-class measures.

Guided checkpoint

Match the measure name to the correct formula from the lecture.

02

Compute the F1-score

F1 = 2 * (Precision * Recall) / (Precision + Recall) = 2 * (0.75 * 0.90) / (0.75 + 0.90) = 1.35 / 1.65 = 0.81818.

Guided checkpoint

Using precision = 0.75 and recall = 0.90, compute the F1-score as a decimal.

03

Mark each statement about composite measures

The lecture gives F1 as the harmonic mean of precision and recall. It also states that MCC ranges from -1 to +1, while informedness and markedness are TPR + TNR - 1 and PPV + NPV - 1 respectively.

Guided checkpoint

Set each statement to true or false.

Section 04

Which measure is explicitly described as balanced under class imbalance? to ROC and PR curves: true or false

01

Which measure is explicitly described as balanced under class imbalance?

The lecture notes that Matthews Correlation Coefficient remains a balanced measure even when the classes are imbalanced.

02

Which measures are directly applicable to multi-class tasks without adaptation?

The lecture lists accuracy and error as directly applicable in the multi-class setting, while measures such as precision, recall, F1-score, and MCC need adaptation.

Guided checkpoint

Select all that apply.

03

ROC and PR curves: true or false

The lecture defines ROC as FPR vs. TPR and PR as recall vs. precision. It also emphasizes that thresholds matter, gives prevalence as the PR random baseline, and uses the diagonal TPR = FPR as the ROC random baseline.

Guided checkpoint

Evaluate each statement using the definitions from the lecture.

Section 05

What AUROC value corresponds to random performance? to How are ROC or PR curves usually extended to multi-class tasks?

01

What AUROC value corresponds to random performance?

The Area Under the Curve section states that AUROC = 0.5 corresponds to random performance, while 1 is perfect and 0 indicates complete disagreement.

02

Which are standard strategies for averaging performance curves across runs or folds?

The lecture warns that curve averaging is non-trivial and then lists three common strategies: interpolation, aggregation, and area-based reporting via per-run AUC summaries.

Guided checkpoint

Select all strategies explicitly mentioned in the lecture.

03

How are ROC or PR curves usually extended to multi-class tasks?

The lecture states that there is no unified multi-class curve. Instead, curves are computed per class using one-vs-rest binarization, and macro or micro averaging can then be reported.

Section 06

Which formula defines accuracy? to Which formula defines balanced accuracy?

01

Which formula defines accuracy?

Accuracy is defined as the share of correct predictions, namely TP+TNP+N\frac{TP + TN}{P + N}.

Guided checkpoint

Choose the definition of accuracy.

Source: provided lecture outline, 'Accuracy and Error'

02

Which formula defines error?

Error is defined as the share of incorrect predictions, namely FP+FNP+N\frac{FP + FN}{P + N}.

Guided checkpoint

Choose the definition of error.

Source: provided lecture outline, 'Accuracy and Error'

03

Which formula defines balanced accuracy?

Balanced accuracy averages the per-class accuracy terms: 12(TPP+TNN)\frac{1}{2}\left(\frac{TP}{P} + \frac{TN}{N}\right).

Guided checkpoint

Choose the definition of balanced accuracy.

Source: provided lecture outline, 'Balanced Performance'

Section 07

Which formula defines balanced error? to Which formula defines the false-positive rate (FPR)?

01

Which formula defines balanced error?

Balanced error is the average of the per-class error rates: 12(FNP+FPN)\frac{1}{2}\left(\frac{FN}{P} + \frac{FP}{N}\right).

Guided checkpoint

Choose the definition of balanced error.

Source: provided lecture outline, 'Balanced Performance'

02

Which formula defines the true-positive rate (TPR)?

The lecture defines the true-positive rate as TPTP+FN\frac{TP}{TP + FN}. It is also the same quantity as recall.

Guided checkpoint

Choose the definition of TPR.

Source: provided lecture outline, 'Class-Conditional Performance'

03

Which formula defines the false-positive rate (FPR)?

The false-positive rate measures how often negatives are predicted as positive: FPFP+TN\frac{FP}{FP + TN}.

Guided checkpoint

Choose the definition of FPR.

Source: provided lecture outline, 'Class-Conditional Performance'

Section 08

Which expression defines the true-negative rate (TNR)? to Which formula defines precision?

01

Which expression defines the true-negative rate (TNR)?

The lecture defines the true-negative rate as 1FPR1 - FPR. This is the same quantity that is later referred to as specificity.

Guided checkpoint

Choose the definition of TNR.

Source: provided lecture outline, 'Class-Conditional Performance'

02

Which expression defines the false-negative rate (FNR)?

The false-negative rate is defined as 1TPR1 - TPR, the complement of the true-positive rate.

Guided checkpoint

Choose the definition of FNR.

Source: provided lecture outline, 'Class-Conditional Performance'

03

Which formula defines precision?

Precision is the share of positive predictions that are correct, given by TPTP+FP\frac{TP}{TP + FP}. The lecture also notes that precision is also called PPV.

Guided checkpoint

Choose the definition of precision.

Source: provided lecture outline, 'Precision and Recall'

Section 09

Which verbal definition matches recall? to Which verbal definition matches specificity?

01

Which verbal definition matches recall?

Recall is defined as the share of detected positives and is identical to TPR.

Guided checkpoint

Choose the best definition of recall.

Source: provided lecture outline, 'Precision and Recall'

02

Which formula defines negative predictive value (NPV)?

NPV is the negative-class analogue of precision and is defined as TNTN+FN\frac{TN}{TN + FN}.

Guided checkpoint

Choose the definition of NPV.

Source: provided lecture outline, 'Precision and Recall Reversed'

03

Which verbal definition matches specificity?

Specificity is the share of detected negatives and is equal to TNR. The lecture writes it as TNTN+FP\frac{TN}{TN + FP}.

Guided checkpoint

Choose the best definition of specificity.

Source: provided lecture outline, 'Precision and Recall Reversed'

Section 10

Which formula defines the F1-score? to Which expression defines informedness?

01

Which formula defines the F1-score?

The lecture defines the F1-score as the harmonic mean of precision and recall: 2PrecisionRecallPrecision+Recall2 \cdot \frac{\text{Precision} \cdot \text{Recall}}{\text{Precision} + \text{Recall}}.

Guided checkpoint

Choose the definition of the F1-score.

Source: provided lecture outline, 'Composite Measure: F1-Score'

02

Which formula defines the Matthews Correlation Coefficient (MCC)?

MCC is defined by the correlation-style formula with numerator TPTNFPFNTP \cdot TN - FP \cdot FN and the square-root normalization in the denominator.

Guided checkpoint

Choose the definition of MCC.

Source: provided lecture outline, 'Composite Measure: MCC'

03

Which expression defines informedness?

The lecture defines informedness as TPR+TNR1TPR + TNR - 1, also described as Youden's J statistic.

Guided checkpoint

Choose the definition of informedness.

Source: provided lecture outline, 'Further Composite Measures'

Section 11

Which expression defines markedness? to Which definition matches AUPRC?

01

Which expression defines markedness?

Markedness is defined as PPV+NPV1PPV + NPV - 1 and captures the reliability of predicted labels.

Guided checkpoint

Choose the definition of markedness.

Source: provided lecture outline, 'Further Composite Measures'

02

Which definition matches AUROC?

AUROC is the summary measure obtained by taking the area under the ROC curve.

Guided checkpoint

Choose the correct definition of AUROC.

Source: provided lecture outline, 'Area Under the Curve (AUC)'

03

Which definition matches AUPRC?

AUPRC is the summary measure obtained by taking the area under the precision-recall curve.

Guided checkpoint

Choose the correct definition of AUPRC.

Source: provided lecture outline, 'Area Under the Curve (AUC)'

Knowledge check

Turn understanding into recall.

The quiz now follows the same concepts in scored form. You can return to this lesson from the quiz whenever a gap appears.