EduFlow
Machine Learning Crash Course

Checkpoint: Doing It Right

Five questions on this section. Answer all of them, then see your score and why each answer is right or wrong.

Question 1 of 5

You scale all of X with StandardScaler().fit_transform(X) and then run cross_val_score(LogisticRegression(), X_scaled, y, cv=5). What’s the problem and the fix?

Question 2 of 5

GridSearchCV over 3 values of max_depth and 4 values of min_samples_leaf, with cv=5 and the default refit=True, is fitted once. How many model fits happen?

Question 3 of 5

Your table has one row per order, several orders per customer, and you want to know how well the model works on new customers. Which validation set-up is right?

Question 4 of 5

A new feature, orders_last_30_days, raises CV ROC AUC from 0.81 to 0.95. The snapshot date is 30 September and the target is churn in the following 90 days. What do you check first?

Question 5 of 5

Cross-validated ROC AUC: logistic regression 0.807 ± 0.034, gradient boosting 0.815 ± 0.055, on the same folds. Boosting is slower and harder to explain. What’s the defensible decision?

5 questions unanswered