InterviewStack.io LogoInterviewStack.io

Supervised Learning Algorithm Selection Questions

Covers selecting and comparing supervised machine learning algorithms for classification and regression tasks. Includes core algorithm families such as logistic regression, decision trees, random forests, gradient boosting implementations like XGBoost and LightGBM, support vector machines, and neural networks, as well as linear regression and regularization techniques including lasso, ridge, and elastic net. Candidates should be able to explain when each algorithm is appropriate based on interpretability requirements, dataset size, feature characteristics, computational constraints, training and inference latency, and robustness to noise and missing data. Also covers hyperparameter tuning, cross validation, bias variance trade offs, feature engineering impact, handling imbalanced classes, evaluation metrics for classification and regression, model calibration, and how to reason about theoretical foundations and senior level trade offs between algorithmic choices.

MediumTechnical
80 practiced
You have a high-dimensional sparse dataset (text TF-IDF with 100k features) for classification. Compare the suitability of logistic regression with L2, linear SVM, naive Bayes, and a shallow neural network. Discuss training time, memory, regularization, and expected performance.
MediumTechnical
91 practiced
Implement in Python a simple k-nearest neighbors (kNN) classifier predict function that supports Euclidean distance and handles ties by choosing the class with smallest average distance. Assume inputs: X_train (n x d), y_train (n,), X_test (m x d), k integer. Do not use scikit-learn.
MediumTechnical
126 practiced
Outline a practical hyperparameter tuning workflow for LightGBM on a medium-sized dataset (200k rows) where compute is limited to a single GPU with 16GB memory. Include search strategy, resource-aware settings, and early-stopping choices.
MediumTechnical
88 practiced
You have a tabular dataset with many categorical features, some with high cardinality (thousands of distinct values). For a gradient boosting model (e.g., LightGBM), describe encoding strategies you'd consider and trade-offs in terms of performance, memory, and risk of leakage.
MediumTechnical
92 practiced
You're building a credit scoring model where regulatory requirements demand explainability and monotonic behavior with respect to income (higher income should not decrease score). Which supervised algorithms and techniques would you consider to meet these constraints?

Unlock Full Question Bank

Get access to hundreds of Supervised Learning Algorithm Selection interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.