Challenge - 5 Problems
Confusion Matrix Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:00remaining
Understanding Confusion Matrix Components
Which part of the confusion matrix represents the number of times the model correctly predicted the positive class?
Attempts:
2 left
❓ Predict Output
intermediate1:30remaining
Output of Confusion Matrix Calculation
What is the output of the following Python code that computes a confusion matrix?
ML Python
from sklearn.metrics import confusion_matrix true_labels = [1, 0, 1, 1, 0, 0, 1] pred_labels = [1, 0, 0, 1, 0, 1, 1] cm = confusion_matrix(true_labels, pred_labels) print(cm.tolist())
Attempts:
2 left
❓ Metrics
advanced1:30remaining
Calculating Accuracy from Confusion Matrix
Given a confusion matrix [[50, 10], [5, 35]], what is the accuracy of the model?
Attempts:
2 left
🔧 Debug
advanced1:00remaining
Identifying Error in Confusion Matrix Calculation
What error will the following code raise?
ML Python
from sklearn.metrics import confusion_matrix true = [1, 0, 1] pred = [1, 0] cm = confusion_matrix(true, pred) print(cm)
Attempts:
2 left
❓ Model Choice
expert2:00remaining
Choosing the Best Metric for Imbalanced Data
You have a dataset with 95% negative and 5% positive samples. Which confusion matrix derived metric is best to evaluate your model's ability to detect positives?
Attempts:
2 left