Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fit.ksvm <- ksvm(Species~., data=iris, kernel= "rbfdot", prob.model=TRUE)
- fit.ksvm
- plot(fit.ksvm, data=iris)
- > plot(fit.ksvm, data=iris)
- Error in .local(x, ...) :
- plot function only supports binary classification
- two-way SVM classification
- x <- rbind(matrix(rnorm(120),,2),matrix(rnorm(120,mean=3),,2))
- y <- matrix(c(rep(1,60),rep(-1,60)))
- svp <- ksvm(x,y,type="C-svc")
- plot(svp,data=x)
- library(e1071)
- m <- svm(Species~., data = iris)
- plot(m, iris, Petal.Width ~ Petal.Length, slice = list(Sepal.Width = 3, Sepal.Length = 4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement