Which of the following best describes the error rate in a classification model?
Think about what 'error rate' means in everyday terms: how often does the model get it wrong?
Error rate measures how often the model makes wrong predictions compared to all predictions. It is the complement of accuracy.
Given a confusion matrix for a binary classifier:
True Positives = 80, True Negatives = 90, False Positives = 10, False Negatives = 20.
What is the failure rate (error rate) of this model?
Failure rate = (False Positives + False Negatives) / Total predictions.
Total predictions = 80 + 90 + 10 + 20 = 200.
Failures = 10 + 20 = 30.
Failure rate = 30 / 200 = 0.15.
A model trained on a dataset shows a high error rate on the test set but low error rate on the training set. What is the most likely cause?
Think about what it means when training error is low but test error is high.
Overfitting means the model learned the training data too well, including noise, so it performs poorly on new data.
You have a dataset with 95% of one class and 5% of another. Which model or technique is best to reduce failure rate on the minority class?
Think about how to handle imbalanced classes to reduce errors on the minority group.
Balanced class weights or oversampling help the model pay more attention to the minority class, reducing its error rate.
What is the output of this Python code that calculates failure rate?
def failure_rate(conf_matrix): TP, TN, FP, FN = conf_matrix total = TP + TN + FP + FN return (FP + FN) / total conf_matrix = (50, 40, 5, 5) print(failure_rate(conf_matrix))
Calculate (FP + FN) / total using the given numbers.
FP + FN = 5 + 5 = 10, total = 50 + 40 + 5 + 5 = 100, so failure rate = 10 / 100 = 0.10.
