Challenge - 5 Problems
Regularization Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding Ridge vs Lasso Regularization
Which statement correctly describes the main difference between Ridge and Lasso regularization?
Attempts:
2 left
❓ Predict Output
intermediate2:00remaining
Output of Lasso Regression Coefficients
What will be the output coefficients after fitting Lasso regression on the given data?
ML Python
from sklearn.linear_model import Lasso import numpy as np X = np.array([[1, 2], [2, 3], [3, 4], [4, 5]]) y = np.array([3, 5, 7, 9]) model = Lasso(alpha=1.0) model.fit(X, y) coefficients = model.coef_ print(coefficients)
Attempts:
2 left
❓ Hyperparameter
advanced2:00remaining
Effect of Increasing Alpha in Ridge Regression
What happens to the coefficients of a Ridge regression model as the regularization parameter alpha increases?
Attempts:
2 left
❓ Metrics
advanced2:00remaining
Choosing Between Ridge and Lasso Using Cross-Validation
You have trained both Ridge and Lasso regression models on the same dataset using cross-validation. The Ridge model has a mean squared error (MSE) of 4.5, and the Lasso model has an MSE of 4.7. Which model should you choose and why?
Attempts:
2 left
🔧 Debug
expert2:00remaining
Debugging Lasso Regression with Unexpected Zero Coefficients
You trained a Lasso regression model on your dataset, but all coefficients are zero. What is the most likely cause?
Attempts:
2 left