1. You need to multiply every value in a two-million-row column by a constant. Why is a vectorised NumPy operation preferred over a Python for loop?
2. You have 50,000 customer records with purchase history but no labels, and you want to discover natural groupings of similar customers. What kind of task is this?
3. In scikit-learn, what is the difference between calling fit() and transform() on a StandardScaler?
4. A colleague scales the entire dataset with StandardScaler and then splits it into training and test sets. Why is this a problem?
5. Household income is missing for 30% of your rows, and those rows are mostly high earners who declined to answer. What is the main risk of filling the gaps with the column mean?
6. Which of these models are sensitive to the scale of the input features?(select all that apply)
7. A feature records which city a customer lives in — about 40 distinct values, with no natural order. What is wrong with encoding it as the integers 1 to 40?
8. You grow a decision tree to its full depth, with no pruning and no minimum-leaf constraint. What do you expect from the training and test errors?
9. Why does a random forest usually generalise better than a single fully grown decision tree?
10. In a linear regression predicting house prices, the coefficient for "number of bedrooms" is 15,000. What does that tell you?
11. In k-nearest neighbours, what happens as you increase k from 1 to a large value?
12. A fraud detector reports 99% accuracy on a dataset where 1% of transactions are fraudulent. Why is that figure uninformative?
13. You are building a first-pass screening test for a serious but treatable disease. Anyone flagged goes on to a cheap confirmatory test. Which metric matters most?
14. What does k-fold cross-validation give you that a single train/test split does not?
15. What does L1 (lasso) regularisation do that L2 (ridge) does not?
16. You try 200 hyperparameter combinations, pick the one with the best test-set score, and report that score as your result. What is wrong?
17. A model scores 0.99 on the training set and 0.72 on validation. Which responses are sensible?(select all that apply)
18. You have 3,000 rows of tabular data with 25 mixed numeric and categorical features, and stakeholders want to know which features drove each prediction. What is the sensible first model to try?