O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

The SVM builds a highly accurate model through kernel trick, by mapping nonlinear data to higher-dimension space, where the data can be more easily separated with a linear boundary or hyperplanes that maximize the margin width among different classes. It avoids overfitting by making use of regularization and in general does not suffer from local optima or multicollinearity.

The svm function determines the type of model (classification or regression) based on the nature of the outcome variable. When the outcome variable is a factor, svm builds a classification model. At a minimum, we need to pass the model formula and the dataset to use as arguments. (Alternately, we can pass the outcome variable and predictor variables separately ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required