SchoolWhool
Quizzes and saved progress, freeSign in freeSign in
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

  1. Why must features be scaled before k-NN?●
  2. Euclidean, Manhattan or cosine: how do you choose?●
  3. What does fit do for k-NN, and what does it cost to predict?●
  4. What does predict_proba mean for k-NN, and how are ties handled?●●
  5. How does K control overfitting?●●

Validation, cross-validation and search

  1. Why do we need a validation set as well as a test set?●
  2. What is k-fold cross-validation, and what does its standard error tell you?●
  3. When does ordinary k-fold give a wrong answer?●●
  4. Grid search or random search?●●
  5. Why is the best cross-validated score of a search optimistic, and what do you report?●●
  6. What is the one-standard-error rule?●●
  7. How do you read a learning curve?●●

Regularisation

  1. Polynomial regression is called linear. Why?●
  2. What does ridge regression do, and why does it help?●
  3. Lasso or ridge: what is the difference, and when do you prefer each?●●
  4. Why does the lasso produce exact zeros?●●
  5. Can you read the lasso's selected features as the important ones?●●
  6. How do you choose α, and can a lasso α be compared with a ridge α?●●