InterviewStack.io LogoInterviewStack.io

ML Fundamentals: Supervised Learning Algorithms Questions

Deep understanding of linear regression, logistic regression, decision trees, random forests, SVMs, and ensemble methods. Be able to explain: how each algorithm works, advantages/disadvantages, when to use each, regularization techniques (L1/L2), hyperparameter tuning, and how to handle overfitting.

MediumTechnical
44 practiced
Design a hyperparameter tuning strategy for a random forest classifier under a fixed compute budget (e.g., 24 CPU-hours). List which hyperparameters to tune (n_estimators, max_depth, max_features, min_samples_leaf, class_weight), propose a search strategy (random vs Bayesian), evaluation method (OOB vs CV), how to parallelize trials, and stopping criteria to maximize model quality within the budget.
EasyTechnical
54 practiced
Define precision, recall, specificity, accuracy, and F1 score for binary classification and explain how they relate to the confusion matrix. Give two business examples where precision is more important than recall and vice versa. Explain why accuracy can be misleading on imbalanced datasets and what metrics you would prefer instead.
EasyTechnical
45 practiced
Explain how random forests reduce overfitting compared to a single decision tree. Discuss the roles of bootstrap sampling, random feature selection at splits (feature bagging), tree depth, and averaging. Also explain how out-of-bag (OOB) error estimation works and when you would rely on OOB vs cross-validation.
HardTechnical
43 practiced
You must train an SVM on 10 million samples with 10,000 features and kernels are infeasible. Describe scalable alternatives and their trade-offs: linear SVM with SGD or liblinear, approximate kernel methods (random Fourier features, Nystrom), dimensionality reduction, distributed training, and streaming/online algorithms. Outline an end-to-end training and validation plan including normalization and checkpoints.
HardTechnical
54 practiced
Explain ElasticNet regularization: write the objective combining L1 and L2 penalties, explain the roles of alpha and l1_ratio, and discuss why ElasticNet is useful when features are correlated. Provide practical guidance for tuning alpha and l1_ratio and how ElasticNet relates to Lasso and Ridge as edge cases.

Unlock Full Question Bank

Get access to hundreds of ML Fundamentals: Supervised Learning Algorithms interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.