1. Home
  2. Data Science
  3. Scikit-learn
  4. With gamma='scale', the default, how does an RBF-kernel…

Added 30 Nov -0001

With gamma='scale', the default, how does an RBF-kernel SVC compute gamma from the training data?

  1. One divided by the number of features times the variance of the data X Correct answer
  2. One divided by the number of support vectors that the fit selects
  3. One divided by the number of features alone, ignoring the spread of the data
  4. One divided by the squared mean distance between all training points

Correct answer

A. One divided by the number of features times the variance of the data X

20 views

MCQSEXAM

Explanation

gamma='scale' sets gamma to 1/(n_features * X.var()), adapting the kernel width to the spread of the data; gamma='auto' uses 1/n_features instead. A larger gamma makes each point's influence local, producing a wiggly boundary that overfits, while a small gamma smooths it. Because the default depends on X.var(), changing the feature scaling changes the effective kernel.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Scikit-learn MCQs

Practise all Scikit-learn MCQs

Similar MCQs