Interview Q&A / Machine Learning

IntermediateQuick answer1 min readUpdated 3 Oct 2026

When would you pick an SVM over logistic regression, and the other way round?

SHORT ANSWER

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.

Explain it simply

Logistic regression is a dependable Maruti hatchback: cheap, easy to understand, gets you there. An RBF SVM is a more flexible car that handles twisty roads (curved boundaries) but costs more to run on big highways (large datasets).

Example

text
                      Logistic regression        SVM
Output                probabilities              scores (probability via extra step)
Boundary              linear (unless you add     linear or curved via kernel
                      features)
Interpretability      coefficients -> odds       hard with non-linear kernels
Training speed        fast, scales to millions   kernel SVM slows past ~100k rows
Loss                  log loss                   hinge loss
Decides boundary by   all points                 support vectors only

For text classification with thousands of sparse features, both a linear SVM and logistic regression do well and are fast: LinearSVC or LogisticRegression.

For a 5,000-row dataset with a clearly curved boundary, an RBF SVM is a strong first try.

Scikit-learn's SVC gives probabilities only with probability=True, which adds an internal cross-validation and slows training.

What to say in the interview

"If I need probabilities, interpretability, or have a lot of data, I start with logistic regression. If the boundary is non-linear and the data is small or medium, I try an RBF SVM. Either way I scale features and tune regularisation strength by cross-validation."

Common mistakes

  • Using kernel SVC on millions of rows.
  • Treating SVC decision scores as probabilities.

#svm#logistic-regression#model-selection

Related questions

Practise more Machine Learning questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Machine Learning quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.