Challenge - 5 Problems
Regression Testing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Purpose of Regression Testing in ML Models
Why is regression testing important when updating a machine learning model?
Attempts:
2 left
💡 Hint
Think about what could happen if changes cause unexpected errors.
✗ Incorrect
Regression testing checks that updates or fixes do not cause old features or predictions to fail.
❓ Metrics
intermediate2:00remaining
Detecting Regression with Metrics
Which metric change would best indicate a regression in a regression model's performance after an update?
Attempts:
2 left
💡 Hint
Think about what a higher error means for model predictions.
✗ Incorrect
An increase in MSE means the model's predictions are less accurate, indicating regression.
🔍 Analysis
advanced2:30remaining
Identifying Regression Cause in Code
After retraining a model, predictions are worse. Which code change is most likely causing regression?
Software Engineering
old code:
model.fit(X_train, y_train)
new code:
model.fit(X_train, y_train, epochs=1)Attempts:
2 left
💡 Hint
Think about how training time affects learning.
✗ Incorrect
Training for only 1 epoch may not be enough for the model to learn patterns, causing worse predictions.
❓ Model Choice
advanced2:00remaining
Choosing a Model for Regression Testing
Which model type is best suited for regression testing to detect performance drops on continuous output tasks?
Attempts:
2 left
💡 Hint
Consider the type of output the model predicts.
✗ Incorrect
Linear Regression predicts continuous values, making it suitable for regression testing on continuous outputs.
🔍 Analysis
expert2:30remaining
Output of Regression Test Code Snippet
What is the output of this Python code simulating a regression test on model predictions?
Software Engineering
old_preds = [2.5, 0.0, 2.1, 7.8] new_preds = [2.7, 0.1, 2.0, 7.9] threshold = 0.15 regression_detected = any(abs(o - n) > threshold for o, n in zip(old_preds, new_preds)) print(regression_detected)
Attempts:
2 left
💡 Hint
Check if any prediction difference exceeds the threshold.
✗ Incorrect
The difference between 2.5 and 2.7 is 0.2, which is greater than 0.15, so regression_detected is True.