Challenge - 5 Problems
Logistic Regression Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding the output of logistic regression
What does the output of a logistic regression model represent?
Attempts:
2 left
❓ Predict Output
intermediate2:00remaining
Output of logistic regression prediction code
What is the output of this Python code using scikit-learn's LogisticRegression?
ML Python
from sklearn.linear_model import LogisticRegression import numpy as np X = np.array([[1, 2], [2, 3], [3, 4], [4, 5]]) y = np.array([0, 0, 1, 1]) model = LogisticRegression() model.fit(X, y) preds = model.predict(np.array([[1, 2], [3, 5]])) print(preds.tolist())
Attempts:
2 left
❓ Hyperparameter
advanced2:00remaining
Choosing the regularization parameter in logistic regression
Which effect does increasing the regularization strength (C parameter) in scikit-learn's LogisticRegression have?
Attempts:
2 left
❓ Metrics
advanced2:00remaining
Interpreting logistic regression evaluation metrics
If a logistic regression model has a high accuracy but low recall on the positive class, what does this imply?
Attempts:
2 left
🔧 Debug
expert2:00remaining
Identifying the cause of poor logistic regression convergence
Given this code snippet, why might the logistic regression model fail to converge?
ML Python
from sklearn.linear_model import LogisticRegression import numpy as np X = np.random.rand(1000, 50) y = np.random.randint(0, 2, 1000) model = LogisticRegression(max_iter=10) model.fit(X, y)
Attempts:
2 left