Week 02 · Page 4 of 4 · Self-Check Quiz
Ten questions. If you miss more than two, revisit the Lesson before Week 3 — regression, the first method you will build there, is only meaningful if you can already judge whether it generalizes.
Answer each question yourself before revealing the answer.
A model achieves near-zero error on its training data but a much larger error under cross-validation. This is the signature of:
- High bias (underfitting)
- High variance (overfitting)
- Perfect generalization
- Data leakage, always
Show answer
A linear model has training error 12.0 and cross-validated error 12.8 (same units). What does this pattern most directly suggest?
- The model is severely overfit
- The model may be too simple to capture the true relationship (high bias)
- The model has perfectly memorized the training data
- Nothing can be concluded from these two numbers
Show answer
What is the defining feature of a train/test split?
- The test set is used to adjust the model's parameters during training
- The test set is held out and used only to evaluate a model already trained on the training set
- The training and test sets must always be the same size
- Train/test splitting is only used for unsupervised learning
Show answer
In 5-fold cross-validation, how many times is each individual data point used for testing, and how many times for training?
- 5 times for testing, 5 times for training
- 1 time for testing, 4 times for training
- 1 time for testing, 1 time for training
- 5 times for testing, 0 times for training
Show answer
Why is the average of the k fold errors generally preferred over a single train/test split?
- It is always faster to compute
- It reduces sensitivity to which particular examples happened to land in the test set
- It guarantees the model has no bias
- It eliminates the need for a test set entirely
Show answer
A materials dataset contains 5 strain variants for each of 20 parent compounds (100 rows total). A student performs a standard random 5-fold split across all 100 rows. What is the main risk?
- The model will definitely underfit
- Strain variants of the same parent compound may be split across training and test folds, causing data leakage
- The model cannot be trained at all with this much data
- There is no risk; random splitting is always correct
Show answer
What does GroupKFold (or an equivalent group-aware split) guarantee that a standard KFold split does not?
- Every fold will have exactly the same number of examples
- All examples sharing the same group label are kept entirely within one fold, never split across folds
- The model will achieve lower error
- Training will run faster
Show answer
In the Week 2 Practical Work, why did the 1-nearest-neighbor model show a much larger gap between the naive and group-aware validation errors than linear regression did?
- KNN is always a worse model than linear regression
- KNN with k=1 can directly copy the label of a near-duplicate training point, so it benefits much more from leaked near-duplicates than a linear model can
- Linear regression does not use cross-validation
- The two models were evaluated on different datasets
Show answer
If you increase k (the number of neighbors) in a k-nearest-neighbors model from 1 to a larger value, what should happen to its sensitivity to the kind of leakage described in this week's lesson, and why?
- It should increase, because more neighbors means more memorization
- It should decrease, because the prediction is now an average over several points rather than a copy of a single nearest one
- It should stay exactly the same regardless of k
- k has no relationship to data leakage
Show answer
A colleague reports a machine learning model for predicting Curie temperature with a cross-validated error far better than anything previously published, using a dataset where many compounds are closely related solid-solution variants of a few parent systems. What should you check first?
- Whether the model used a neural network or a simpler method
- Whether the cross-validation splitting was done by parent system/group rather than by individual row, to rule out leakage inflating the reported performance
- Whether the paper used Python or another programming language
- Whether the training set was large enough in absolute terms
Show answer
9–10 correct: you are ready for Week 3. 6–8 correct: revisit the definition boxes for bias, variance, and data leakage on the Lesson page. 5 or fewer: re-read the full Lesson page and redo the Practical Work before starting Week 3, since the regression methods introduced next week will be evaluated using exactly the tools from this week.
0 Comments