1
$\begingroup$

I am using Support Vector Machines from "e1071" package in R. For standard IRIS data the code is:

data(iris);
attach(iris);
x <- subset(iris, select = -Species);
y <- Species;
model <- svm(x, y)

After that using function predict() I can get a prediction with the trained model for any data from the test Set.

However the question for me is: ow can I get the real rule of finding a class for samples from Test Set?

Support Vector Machines determines high-dimensional hyperplane which divides data into classes. From literature I found that classifier (hypersurface) is in the simplest case defined by weights (W) and parameter (B). However for nonlinear cases one need transformation $x \rightarrow f_{i}(x)$.

Can anyone give any example of extracting the real rule from any package with SVM (preferably in R)?

$\endgroup$
1
$\begingroup$

For non-linear SVMs you can't extract a simple relation of features that provides the classification rule. That's the whole point around the kernel trick and the representation of the problem in the dual.

In other words, your classification rule is not based on some relation of the features, but on the similarity of the unlabelled sample to some of the labelled examples of the training set - not all of them only the Support Vectors. The similarity is defined using the kernel function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.