Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Support Vector Machine : What are C & Gamma? [closed]

I am new to Machine Learning 7 I have started following Udacity's Intro to Machine Learning

I was following Simple Vector Machine's when this concept of C and Gamma came along. I did some digging around and found the following:

C - A high C tries to minimize the misclassification of training data and a low value tries to maintain a smooth classification. This makes sense to me.

Gamma - I am unable to understand this one.

Can someone explain this to me in layman terms?

like image 850
AgentX Avatar asked Dec 05 '22 18:12

AgentX


2 Answers

When you are using SVM, you are necessarily using one of the kernels: linear, polynomial or RBF=Radial Base Function (also called Gaussian Kernel) or anything else . The latter is

K(x,x') = exp(-gamma * ||x-x'||^2) 

which explicitly contains your gamma. The larger the gamma, the narrower the gaussian "bell" is.

I believe, as you go with the course, you will learn more about such "kernel trick".

like image 168
lanenok Avatar answered Jan 08 '23 13:01

lanenok


Intuitively, the gamma parameter defines how far the influence of a single training example reaches, with low values meaning ‘far’ and high values meaning ‘close’. The gamma parameters can be seen as the inverse of the radius of influence of samples selected by the model as support vectors. The C parameter trades off misclassification of training examples against simplicity of the decision surface. A low C makes the decision surface smooth, while a high C aims at classifying all training examples correctly by giving the model freedom to select more samples as support vectors. http://scikit-learn.org/stable/auto_examples/svm/plot_rbf_parameters.html

like image 31
UserX Avatar answered Jan 08 '23 14:01

UserX