Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Examples

R provides the svm in e1071 as an interface to LIBSVM, which provides a very efficient and fast implementation.



  library(e1071)
  iris.svm <- svm(Species ~ ., data=iris, probability=TRUE)
  plot(iris.svm, iris, Petal.Width ~ Petal.Length,
          slice = list(Sepal.Width = 3, Sepal.Length = 4))
  pred <- predict(iris.svm, iris, probability = TRUE)
  attr(pred, "prob") # to get the probabilities

kernlab for kernel learning provides ksvm and is more integrated into R so that different kernels can easily be explored. A new class called kernel is introduced, an kernel functions are objects of this class.



Copyright © 2004-2006 [email protected]
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.