Challenge - 5 Problems
Linear Regression Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of Linear Regression Model Training
What is the printed output of the following code snippet after training a linear regression model?
ML Python
from sklearn.linear_model import LinearRegression import numpy as np X = np.array([[1], [2], [3], [4], [5]]) y = np.array([2, 4, 6, 8, 10]) model = LinearRegression() model.fit(X, y) print(round(model.coef_[0], 2), round(model.intercept_, 2))
Attempts:
2 left
❓ Model Choice
intermediate1:30remaining
Choosing the Correct Model for Linear Regression
Which scikit-learn class should you use to perform a simple linear regression on a dataset?
Attempts:
2 left
❓ Hyperparameter
advanced2:00remaining
Effect of fit_intercept Parameter in LinearRegression
What is the effect of setting fit_intercept=False when creating a LinearRegression model in scikit-learn?
Attempts:
2 left
❓ Metrics
advanced1:30remaining
Interpreting R² Score for Linear Regression
After training a linear regression model, you calculate the R² score on test data and get 0.85. What does this value mean?
Attempts:
2 left
🔧 Debug
expert2:30remaining
Debugging Unexpected Model Coefficients
You train a LinearRegression model on a dataset but get very large coefficient values that don't make sense. Which of the following is the most likely cause?
Attempts:
2 left