Why must gamma and C be tuned jointly in an RBF support vector machine?

Quick Overview

Asks why the gamma and C hyperparameters of an RBF support vector machine have to be tuned together. Tests understanding of kernel width, the margin penalty, how the two trade off in model complexity, and how to set up a practical search.

Why must gamma and C be tuned jointly in an RBF support vector machine?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why must `gamma` and `C` be tuned jointly in an RBF support vector machine? ```hint What each one controls Describe what each parameter does to the flexibility of the decision boundary on its own, then ask whether one effect can make up for the other. ``` ```hint Picture the search space Imagine a heatmap of validation accuracy over both parameters on log axes. Think about the shape the good region would take. ``` ### What a Strong Answer Covers - What `gamma` does to the reach of each support vector and to the shape of the boundary. - What `C` does to the penalty on margin violations. - Why the best value of one parameter depends on the other, and the shape of the good region in log space. - A practical search procedure, including feature scaling. ### Follow-up Questions - If you could only afford about 10 model fits, how would you search `C` and `gamma`? - Why does feature scaling change the meaning of `gamma`, and what does scikit-learn's default `gamma='scale'` do? - At very large `gamma`, why can no value of `C` prevent overfitting? - What can the number of support vectors tell you about whether a fitted model is underfitting or overfitting?

Overview: Asks why the gamma and C hyperparameters of an RBF support vector machine have to be tuned together. Tests understanding of kernel width, the margin penalty, how the two trade off in model complexity, and how to set up a practical search.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Why must gamma and C be tuned jointly in an RBF support vector machine?

What a Strong Answer Covers Guidance

  • What gamma does to the reach of each support vector and to the shape of the boundary.
  • What C does to the penalty on margin violations.
  • Why the best value of one parameter depends on the other, and the shape of the good region in log space.
  • A practical search procedure, including feature scaling.

Follow-up Questions Guidance

  • If you could only afford about 10 model fits, how would you search C and gamma ?
  • Why does feature scaling change the meaning of gamma , and what does scikit-learn's default gamma='scale' do?
  • At very large gamma , why can no value of C prevent overfitting?
  • What can the number of support vectors tell you about whether a fitted model is underfitting or overfitting?