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. Can you handle class imbalance without changing the data? What is threshold tuning?

    Yes. Most classifiers output a probability, and the default cut-off of 0.5 is arbitrary. Lowering it for a rare class raises recall at the cost of precision. Pick the threshold from the precision-recall curve using business costs.

    IntermediateQuick answer1 min read
  2. How do class weights, oversampling and undersampling differ for imbalanced data?

    Class weights make mistakes on the rare class cost more during training. Oversampling duplicates or synthesises minority rows; undersampling removes majority rows. Weights change no data, oversampling can overfit, undersampling can throw away useful rows.

    IntermediateQuick answer1 min read
  3. How does SMOTE work, and what are its limitations?

    SMOTE creates synthetic minority samples by picking a minority point, choosing one of its nearest minority neighbours, and placing a new point at a random spot on the line between them. It reduces duplication but can create noisy points near class borders.

    IntermediateQuick answer1 min read