Challenge - 5 Problems
Linear Regression Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:00remaining
Understanding the purpose of linear regression
What is the main goal of linear regression in machine learning?
Attempts:
2 left
❓ Predict Output
intermediate1:00remaining
Output of simple linear regression prediction
What is the predicted value y when x=3 using the model y = 2x + 1?
ML Python
def predict(x): return 2 * x + 1 result = predict(3) print(result)
Attempts:
2 left
❓ Hyperparameter
advanced1:30remaining
Effect of learning rate in linear regression training
What happens if the learning rate is set too high during linear regression training with gradient descent?
Attempts:
2 left
❓ Metrics
advanced1:30remaining
Choosing the right metric for linear regression
Which metric is commonly used to measure the error of a linear regression model's predictions?
Attempts:
2 left
🔧 Debug
expert2:00remaining
Identifying the error in linear regression code
What error will this code raise when fitting a linear regression model using scikit-learn?
from sklearn.linear_model import LinearRegression
X = [[1], [2], [3]]
y = [2, 4, 6]
model = LinearRegression()
model.fit(X, y)
print(model.predict([4]))
Attempts:
2 left