Christian Hennig wrote:
> 
> Hello list,
> 
> I want to apply svm from library e1071, and I want to supply class weights.
> I do not really understand the help entry (and there is no example)
> 
> class.weights: a named vector of weights for the different classes,
>           used for asymetric class sizes. Not all factor levels have to
>           be supplied (default weight: 1). All components have to be
>           named.
> 
> I have two classes, factor levels are 1 (2000 cases, say) and 2 (1000
> cases). How has the entry for class.weights to look like? (I'm more
> interested in the syntax than what the weight should be, but if you know,
> please tell me...)

for example, consider the two classes `male' and `female':

svm(..., class.weights = c(male=0.4, female=0.6))

g.,
-d

> 
> Best,
> Christian
> 
> --
> ***********************************************************************
> Christian Hennig
> Seminar fuer Statistik, ETH-Zentrum (LEO), CH-8092 Zuerich (currently)
> and Fachbereich Mathematik-SPST/ZMS, Universitaet Hamburg
> [EMAIL PROTECTED], http://stat.ethz.ch/~hennig/
> [EMAIL PROTECTED], http://www.math.uni-hamburg.de/home/hennig/
> #######################################################################
> ich empfehle www.boag.de
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help

-- 
        Mag. David Meyer            Wiedner Hauptstrasse 8-10
Vienna University of Technology     A-1040 Vienna/AUSTRIA
         Department of              Tel.: (+431) 58801/10772
Statistics and Probability Theory   Fax.: (+431) 58801/10798

______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
  • [R] svm Christian Hennig
    • David Meyer

Reply via email to