[BioC] svm (e1071) class weighting in a multi-class problem
Javier Pérez Florido
jpflorido at gmail.com
Thu Mar 8 09:55:36 CET 2012
Dear list,
I have a question related to the class weighting parameter of svm
classifier in e1071 package.
Class weighting, as stated in the vignette of svm in such package, is
useful when asymmetric class sizes are present. For example, for two
classes A and B of 50 and 100 samples respectively, a weight of 2 can be
assigned to class A and a weight of 1 to class B.
However, what happens in a multi-class problem? In e1071 package, SVM
follows the one-against-one approach and for K classes, K(K-1)/2 binary
classifiers are built. In my case and depending on the comparison a
different class weighting is desired. For example, if a problem has 3
classes
Class 1: 10 samples
Class 2: 20 samples
Class 3: 30 samples
When a Class1 vs Class 2 classifier is built, I would like to use a
weight of 2 for Class 1 and a weight of 1 for Class 2
When a Class1 vs Class 3 classifier is built, I would like to use a
weight of 3 for Class 1 and a weight of 1 for Class 3
When a Class2 vs Class 3 classifier is built, I would like to use a
weight of 1.5 for class 2 and a weight of 1 for Class 3
How can svm handle this issue? How does svm really handle this issue
(class weighting for a multi-class problem)?
Thanks for your kindly help,
All the best,
Javier
More information about the Bioconductor
mailing list