Machine Learning · Module 4Module material
The First Classifier, Generalisation and Regularisation interview questions
18 questions interviewers ask on this module’s topics, from first principles to the follow-ups. Each comes with a model answer.
Distance and k-nearest neighbours
- Why must features be scaled before k-NN?●
- Euclidean, Manhattan or cosine: how do you choose?●
- What does
fitdo for k-NN, and what does it cost to predict?● - What does
predict_probamean for k-NN, and how are ties handled?●● - How does K control overfitting?●●
Validation, cross-validation and search
- Why do we need a validation set as well as a test set?●
- What is k-fold cross-validation, and what does its standard error tell you?●
- When does ordinary k-fold give a wrong answer?●●
- Grid search or random search?●●
- Why is the best cross-validated score of a search optimistic, and what do you report?●●
- What is the one-standard-error rule?●●
- How do you read a learning curve?●●
Regularisation
- Polynomial regression is called linear. Why?●
- What does ridge regression do, and why does it help?●
- Lasso or ridge: what is the difference, and when do you prefer each?●●
- Why does the lasso produce exact zeros?●●
- Can you read the lasso's selected features as the important ones?●●
- How do you choose α, and can a lasso α be compared with a ridge α?●●