0
0
Software Engineeringknowledge~20 mins

Regression testing in Software Engineering - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Regression Testing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Purpose of Regression Testing in ML Models
Why is regression testing important when updating a machine learning model?
ATo ensure new changes do not break existing model predictions
BTo increase the training speed of the model
CTo reduce the size of the training dataset
DTo improve the model's ability to learn new features
Attempts:
2 left
💡 Hint
Think about what could happen if changes cause unexpected errors.
Metrics
intermediate
2:00remaining
Detecting Regression with Metrics
Which metric change would best indicate a regression in a regression model's performance after an update?
AIncrease in Mean Squared Error (MSE)
BIncrease in training speed
CDecrease in model size
DIncrease in number of features
Attempts:
2 left
💡 Hint
Think about what a higher error means for model predictions.
🔍 Analysis
advanced
2: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)
AIncreasing epochs causes overfitting
BChanging the dataset causes regression
CReducing training epochs to 1 causes underfitting
DUsing a different optimizer causes regression
Attempts:
2 left
💡 Hint
Think about how training time affects learning.
Model Choice
advanced
2:00remaining
Choosing a Model for Regression Testing
Which model type is best suited for regression testing to detect performance drops on continuous output tasks?
AK-Means Clustering
BLinear Regression
CDecision Tree Classifier
DNaive Bayes Classifier
Attempts:
2 left
💡 Hint
Consider the type of output the model predicts.
🔍 Analysis
expert
2: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)
ATypeError
BFalse
CSyntaxError
DTrue
Attempts:
2 left
💡 Hint
Check if any prediction difference exceeds the threshold.