When should you choose a linear kernel instead of an RBF kernel?

Quick Overview

Asks when a support vector machine should use a linear kernel instead of an RBF kernel. Tests your reasoning about feature count versus sample count, sparse high-dimensional data, how kernel training cost grows with data size, interpretability, and hyperparameter tuning.

When should you choose a linear kernel instead of an RBF kernel?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

When training a support vector machine, when should you choose a linear kernel instead of an RBF (Gaussian) kernel? ```hint Look at the shape of the data Compare the number of features with the number of samples, and ask how likely the classes are to be separable by a hyperplane in the original space. ``` ```hint Count the cost Think about how training time and memory of a kernel SVM grow as the number of rows grows, and how many hyperparameters each kernel needs. ``` ### What a Strong Answer Covers - The data conditions that favor a linear kernel, such as many sparse features relative to samples - How kernel SVM training time and memory grow with the number of samples, compared with linear solvers - What a linear model gives in interpretability, prediction cost and tuning effort - The conditions under which RBF is worth its extra cost - A practical order for trying the two ### Follow-up Questions - The dataset is too large for an RBF SVM, but a linear model underfits. What can you do? - What do $\gamma$ and $C$ control in an RBF SVM, and what happens with a very small or very large $\gamma$? - Why do features need to be scaled before fitting an RBF SVM? - How would you check whether the data is close to linearly separable?

Overview: Asks when a support vector machine should use a linear kernel instead of an RBF kernel. Tests your reasoning about feature count versus sample count, sparse high-dimensional data, how kernel training cost grows with data size, interpretability, and hyperparameter tuning.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

When training a support vector machine, when should you choose a linear kernel instead of an RBF (Gaussian) kernel?

What a Strong Answer Covers Guidance

  • The data conditions that favor a linear kernel, such as many sparse features relative to samples
  • How kernel SVM training time and memory grow with the number of samples, compared with linear solvers
  • What a linear model gives in interpretability, prediction cost and tuning effort
  • The conditions under which RBF is worth its extra cost
  • A practical order for trying the two

Follow-up Questions Guidance

  • The dataset is too large for an RBF SVM, but a linear model underfits. What can you do?
  • What do γ\gamma and CC control in an RBF SVM, and what happens with a very small or very large γ\gamma ?
  • Why do features need to be scaled before fitting an RBF SVM?
  • How would you check whether the data is close to linearly separable?