InterviewStack.io LogoInterviewStack.io

Classification and Regression Fundamentals Questions

Covers the core concepts and distinctions between classification and regression in supervised learning. Classification predicts discrete categories, either binary or multi class, while regression predicts continuous numerical values. Candidates should understand how to format and encode target variables for each task, common algorithms for each family, and the theoretical foundations of representative models such as linear regression and logistic regression. For regression, know least squares estimation, coefficients interpretation, residual analysis, assumptions of the linear model, R squared, and common loss and error measures including mean squared error, root mean squared error, and mean absolute error. For classification, know logistic regression with its sigmoid transformation and probability interpretation, decision trees, k nearest neighbors, and other basic classifiers; understand loss functions such as cross entropy and evaluation metrics including accuracy, precision, recall, F one score, and area under the receiver operating characteristic curve. Also be prepared to discuss model selection, regularization techniques such as L one and L two regularization, handling class imbalance, calibration and probability outputs, feature preprocessing and encoding for targets and inputs, and trade offs when choosing approaches based on problem constraints and data characteristics.

EasyTechnical
29 practiced
Compare using mean squared error (MSE) and cross-entropy (log-loss) for classification tasks. Explain why cross-entropy is typically preferred for probabilistic classifiers, and when MSE might still be used or cause issues (e.g., saturation, poor gradients).
HardSystem Design
22 practiced
Design a scalable training and inference approach for a large regression model trained on 100M rows and 1,000 features (e.g., GBM). Discuss distributed training alternatives (XGBoost, LightGBM, Dask, Spark), feature storage strategies, incremental training, hyperparameter search at scale, and low-latency inference options (sharded serving, model quantization, caching).
MediumTechnical
22 practiced
Implement functions in Python to compute precision, recall, and F1 score for multi-class classification with options for micro, macro, and weighted averaging. Specify the function signature and input assumptions (lists/numpy arrays of integer labels). Explain complexity and how to handle zero-division when a class has no predicted samples.
MediumTechnical
41 practiced
List and explain key residual diagnostics for linear regression: residual vs fitted plot, QQ-plot for normality, Cook's distance for influential points, leverage, Durbin-Watson for autocorrelation, and Breusch-Pagan for heteroscedasticity. For each, describe what you would do if a problem is detected.
MediumTechnical
26 practiced
You must choose between a linear regression and a tree-based model (e.g., gradient boosted trees) for a regression problem with heavy-tailed errors and obvious nonlinearity in feature relationships. Describe factors that will influence your choice (interpretability, robustness to outliers, sample size, feature interactions) and propose data transformations or alternative losses you might try.

Unlock Full Question Bank

Get access to hundreds of Classification and Regression Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.