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
32 practiced
Describe why feature scaling matters. For each of these algorithms explain whether scaling is required and why: k-NN, SVM, logistic regression trained with gradient descent, decision trees, and PCA. Given numeric features with heavy outliers and skew, which scaling/transformations would you apply and why?
MediumTechnical
29 practiced
Compare model-agnostic interpretability techniques (LIME, SHAP) and global explanations like Partial Dependence Plots (PDP). For a production classifier, describe how you would use these tools to explain a single prediction and to audit model behavior across cohorts.
EasyTechnical
30 practiced
Given this confusion matrix for a binary classifier evaluated on 1,000 samples: TP=70, FP=30, FN=20, TN=880. Compute accuracy, precision, recall, F1 score, specificity and briefly interpret each metric in the context of a rare positive class. Which metric(s) would you prioritize if the positive class represents fraud?
MediumTechnical
32 practiced
Explain limitations of ROC-AUC when classes are highly imbalanced. Define precision-recall curve and PR-AUC and show conceptually why PR-AUC is often preferred for rare positive classes. What is partial AUC (pAUC) and when would you use it?
EasyTechnical
32 practiced
Explain the logistic regression model: show how the linear predictor is transformed to a probability using the sigmoid function, derive the relationship between coefficients and log-odds, and describe how multiclass classification is handled (one-vs-rest vs softmax). What are practical signs that logistic regression is a reasonable first model for a classification task?

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.