Interview Q&A / Machine Learning

INTERVIEW Q&A · 55 QUESTIONS

Machine Learning interview questions

Supervised vs unsupervised learning, overfitting, metrics and the classic models, explained simply.

  1. What is the difference between L1 and L2 regularisation?

    Both add a penalty on weight size to the loss to reduce overfitting. L1 (Lasso) adds the sum of absolute weights and pushes many weights to exactly zero, so it also selects features. L2 (Ridge) adds the sum of squared weights and shrinks all weights smoothly towards zero without removing them.

    AdvancedIn-depth5 min read
  2. Why can't a random forest or decision tree extrapolate beyond the training range?

    Tree leaves hold averages of training targets, so a prediction can never exceed the largest or fall below the smallest value seen in training. For trends that continue upward, such as sales growth, linear models or feature engineering work better.

    AdvancedQuick answer1 min read