set.seed(46)
x <- rbind(
matrix(rnorm(8, -2, 0.2), ncol = 2),
matrix(rnorm(8, 0, 0.2), ncol = 2),
matrix(rnorm(8, 2, 0.2), ncol = 2)
)
y <- factor(rep(c("a", "b", "c"), each = 4))
print(svms(x, y, kernel = "linear", max_passes = 2, max_iter = 100))
Run the code above in your browser using DataLab