Challenge - 5 Problems
Bias-Variance Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Understanding Bias and Variance
Which statement best describes the relationship between bias and variance in a machine learning model?
Attempts:
2 left
❓ Predict Output
intermediate2:00remaining
Effect of Model Complexity on Error
Consider the following Python code that simulates training and test errors for models of increasing complexity. What is the output of the print statement?
ML Python
import numpy as np complexity = np.array([1, 2, 3, 4, 5]) train_error = 1 / complexity test_error = 1 / complexity + 0.1 * complexity print(f"Train error: {train_error}") print(f"Test error: {test_error}")
Attempts:
2 left
❓ Hyperparameter
advanced1:30remaining
Choosing Regularization Strength
You train a linear regression model with L2 regularization (Ridge). Increasing the regularization parameter lambda will most likely:
Attempts:
2 left
❓ Metrics
advanced1:30remaining
Interpreting Learning Curves
You observe the following behavior in learning curves: training error is high and stable, but test error is high and does not improve with more data. What does this indicate about the model?
Attempts:
2 left
🔧 Debug
expert2:30remaining
Diagnosing Model Behavior from Code
Given the following code snippet training a decision tree, what is the most likely cause of the model having high training error and high test error?
from sklearn.tree import DecisionTreeClassifier
model = DecisionTreeClassifier(max_depth=1)
model.fit(X_train, y_train)
train_acc = model.score(X_train, y_train)
test_acc = model.score(X_test, y_test)
print(f"Train accuracy: {train_acc}")
print(f"Test accuracy: {test_acc}")Attempts:
2 left