InterviewStack.io LogoInterviewStack.io

Classical Machine Learning Algorithms Questions

Foundational non-deep-learning models and when to reach for each. Covers linear and logistic regression, decision trees and ensemble methods (random forests, gradient boosting), support vector machines, k-nearest neighbors, and clustering, including their assumptions, strengths, and failure modes. Focuses on algorithm selection and the numerical and implementation considerations behind these workhorse models.

MediumTechnical
30 practiced

You suspect the relationship between a feature and the target isn't linear. How would you use polynomial features or interaction terms with linear regression, and how do you keep that from blowing up variance and overfitting as you add degree?

HardTechnical
26 practiced

What is nested cross-validation, and why do you need it when you're doing both feature selection or hyperparameter tuning and estimating generalization error? Walk through the outer/inner loop structure and the computational cost of doing it properly.

MediumTechnical
22 practiced

For a 100k-row, 200-feature tabular dataset with high-cardinality categoricals, how would you decide between a gradient boosting model and a neural network with embeddings? Compare expected sample complexity, training and inference cost, and how each handles categorical features and missingness.

MediumTechnical
29 practiced

Why can naively computing the sigmoid or softmax overflow for large logits, and how does the log-sum-exp trick fix it? What guardrails would you build into a production ML library to avoid this?

HardTechnical
29 practiced

Why is the L1 penalty not differentiable at zero, and how do solvers like coordinate descent actually handle that? Can you sketch the soft-thresholding update for the univariate case?

Unlock Full Question Bank

Get access to all Classical Machine Learning Algorithms interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.