Interview Q&A / Machine Learning
Machine Learning interview questions
Supervised vs unsupervised learning, overfitting, metrics and the classic models, explained simply.
Prefer rapid revision? Practise Machine Learning short interview answers →
- What is a support vector machine, and what are support vectors and margin?
An SVM finds the separating line (hyperplane) with the widest margin between two classes. Support vectors are the training points closest to that boundary; only they decide where it sits.
BeginnerQuick answer1 min read - What do the C and gamma parameters do in an RBF SVM?
C controls how much misclassification is tolerated: high C fits training data tightly (risk overfitting), low C allows a wider, smoother margin. Gamma sets how far one point's influence reaches: high gamma gives wiggly, local boundaries, low gamma gives smooth ones.
IntermediateQuick answer1 min read - What is the kernel trick in SVM?
A kernel computes the dot product of two points as if they were mapped to a higher-dimensional space, without actually building that space. It lets a linear SVM draw curved boundaries cheaply. Common kernels: linear, polynomial, RBF.
IntermediateQuick answer1 min read - When would you pick an SVM over logistic regression, and the other way round?
Pick logistic regression when you want calibrated probabilities, speed and interpretable coefficients. Pick an SVM (often with RBF kernel) when classes are not linearly separable and the dataset is small to medium. Both need scaled features.
IntermediateQuick answer1 min read