EasyDeepLearn

How does the C parameter in an SVM affect the fit?

medium

Answer

  • C weights the misclassification penalty in the soft-margin loss (opposite of a typical regularization strength — larger C means less regularization).
  • Large C: try hard to classify every training point correctly → narrow margin, complex boundary, high variance.
  • Small C: tolerate more margin violations → wider margin, simpler boundary, high bias.
  • Tune C on a log-spaced grid with CV.
  • With an RBF kernel, C interacts with gamma — tune them jointly.
Check yourself — multiple choice
  • Large C = more regularization
  • Large C = less regularization / narrow margin; small C = wider margin, more bias
  • C only affects training speed
  • C is fixed at 1 in scikit-learn

C is inversely a regularization strength — large C ⇒ hard-margin-like ⇒ overfits.

#svm#hyperparameter-tuning#regularization

Practise Supervised Learning

215 interview questions in this topic.

Related questions