I try to train a linear SVM using package e1071, with cost=10 on the following data:
x <- matrix(c(-0.97, -0.69, -1.14, -0.93, 0.26, 1.14, 0.76,
1.32, -0.79, 1.04, -.80, -.97, -1.09, -1.09, 0.63,
1.09, 0.92, 1.49, -0.52, 0.34), 10, 2)
colnames(x) <- c("X1","X2")
y <- c(-1,-1,-1,-1,1,1,1,1,1,-1)
svm2 <- svm(x,y,type="C-classification", kernel="linear",
cost=10, scale=FALSE)
In theory, point E(0.26,0.63)
should also be a support vector. But svm()
does not return it as a support vector, but considers point T(1.14,1.09)
as SV. This happens also when I change the kernel to "radial".
In theory, E should be a support vector, while point T(1.14, 1.09) not, if I understand correctly the theory.
Might this inconsistency be due to the fact that I have only 10 observations?