[R] Question about framework to weighting different classes in SVM

David Meyer david.meyer at wu-wien.ac.at
Thu Jul 5 17:58:10 CEST 2007


Adschai:

here is an example for class.weights (isn't it on the help page?):

      data(iris)
      i2 <- iris
      levels(i2$Species)[3] <- "versicolor"
      summary(i2$Species)
      wts <- 100 / table(i2$Species)
      wts
      m <- svm(Species ~ ., data = i2, class.weights = wts)

Cheers,
David



More information about the R-help mailing list