nitinvijay23
nitinvijay23

Reputation: 1841

Can anyone explain me all the parameters of sklearn SVM.SVC in a simplified manner?

I am trying to lean SVC classifier of SVM model in sklearn. I have learned to use it on various datasets and even applied gridsearch to improve the results but I have not yet understood some parameters like C, gamma.

If anyone can give me simple but detail explanation of each parameter, it would be great.

Upvotes: 1

Views: 2739

Answers (1)

Sam Weisenthal
Sam Weisenthal

Reputation: 2951

Since we are trying to minimize some objective function, we can add some 'size' measure of the coefficient vector itself to the function. C is essentially the inverse of the weight on that 'regularization' term. Decreasing C will prevent overfitting by forcing the coefficients to be sparse or small, depending on the penalty. Increasing C too much will promote underfitting.

Gamma is a parameter for the RBF kernel. Increasing gamma allows for a more complex decision boundary (which can lead to overfitting, but can also improve results--it depends on the data).

This scikit-learn tutorial graphically shows the effect of changing both hyperparameters.

Upvotes: 1

Related Questions