How would you tune C and gamma together for an RBF SVM?

Quick Overview

Describe how to tune the C and gamma hyperparameters of an RBF kernel SVM together. Tests whether you know what each parameter controls, why they interact, how to set up a scaled, cross-validated log-grid search, and how to keep the search affordable on large data.

How would you tune C and gamma together for an RBF SVM?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How would you tune `C` and `gamma` together for an RBF SVM? ```hint Interaction Think about what each parameter does to the decision boundary, and whether the best value of one depends on the value of the other. ``` ```hint Before the search Consider which scale the candidate values should use, and what has to happen to the features before a distance-based kernel gives meaningful values. ``` ### What a Strong Answer Covers - What `C` and `gamma` each control and how each one leads to underfitting or overfitting - Why the two interact and have to be searched jointly - A concrete procedure: scaling inside the cross-validation pipeline, log-spaced values, a fitting metric, refinement and a held-out check - Diagnostics for choosing among near-ties and spotting memorization - How to keep the search affordable on large data ### Follow-up Questions - Why do the good (`C`, `gamma`) pairs form a diagonal ridge? - The best `C` sits at the top edge of your grid. What do you do, and what might it tell you about the data? - How would you tune an RBF SVM on 2 million rows? - When would you drop the RBF kernel for a linear SVM?

Overview: Describe how to tune the C and gamma hyperparameters of an RBF kernel SVM together. Tests whether you know what each parameter controls, why they interact, how to set up a scaled, cross-validated log-grid search, and how to keep the search affordable on large data.

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

How would you tune C and gamma together for an RBF SVM?

What a Strong Answer Covers Guidance

  • What C and gamma each control and how each one leads to underfitting or overfitting
  • Why the two interact and have to be searched jointly
  • A concrete procedure: scaling inside the cross-validation pipeline, log-spaced values, a fitting metric, refinement and a held-out check
  • Diagnostics for choosing among near-ties and spotting memorization
  • How to keep the search affordable on large data

Follow-up Questions Guidance

  • Why do the good ( C , gamma ) pairs form a diagonal ridge?
  • The best C sits at the top edge of your grid. What do you do, and what might it tell you about the data?
  • How would you tune an RBF SVM on 2 million rows?
  • When would you drop the RBF kernel for a linear SVM?