InterviewStack.io LogoInterviewStack.io

Machine Learning Algorithms and Theory Questions

Core supervised and unsupervised machine learning algorithms and the theoretical principles that guide their selection and use. Covers linear regression, logistic regression, decision trees, random forests, gradient boosting, support vector machines, k means clustering, hierarchical clustering, principal component analysis, and anomaly detection. Topics include model selection, bias variance trade off, regularization, overfitting and underfitting, ensemble methods and why they reduce variance, computational complexity and scaling considerations, interpretability versus predictive power, common hyperparameters and tuning strategies, and practical guidance on when each algorithm is appropriate given data size, feature types, noise, and explainability requirements.

EasyTechnical
0 practiced
Explain how decision trees choose splits for classification and regression tasks. Compare Gini impurity and entropy for classification and mean-squared-error for regression, and describe how continuous and categorical features are handled. Explain common strategies to prevent trees from overfitting.
HardTechnical
0 practiced
You must build a predictive system that consumes numerical, categorical, text, and image data and must be explainable to product managers. Propose a modular pipeline design that balances predictive performance and interpretability: per-modality models, feature fusion strategies, modality-specific explainers (SHAP for tabular, Grad-CAM for images), and a UI/reporting approach to present explanations across modalities.
MediumTechnical
0 practiced
Explain conceptually how gradient boosting fits an additive model using gradient and (optionally) second-order derivative information. Describe how XGBoost leverages first and second derivatives of the loss during tree fitting and why second-order terms improve leaf-weight estimates and convergence.
HardTechnical
0 practiced
Provide a theoretical explanation for why bagging reduces variance of unstable learners. Derive the expected variance of the average of B identically distributed base learners with pairwise correlation rho and base learner variance sigma^2. Explain practical implications for ensembling.
MediumTechnical
0 practiced
You have unlabeled clustering results. Describe a practical plan to evaluate clustering quality without ground truth. Include internal metrics (silhouette score, Davies–Bouldin), stability and robustness checks (subsampling, bootstrapping), visual diagnostics, and validating clusters via downstream supervised tasks or business KPIs.

Unlock Full Question Bank

Get access to hundreds of Machine Learning Algorithms and Theory interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.