[R] SVM unbalanced classes
Christian Schulz
ozric at web.de
Tue Mar 9 12:34:00 CET 2004
Hi,
SVM have got the option class.weights to put the
apriori-distribution for your target variable.
To oversample, or undersample a specific class
you have imho write a own function!?
Perhaps it helps ,christian
Am Dienstag, 9. März 2004 11:29 schrieb Frank Gerrit Zoellner:
> Hi!
>
> I am using R 1.8.1 and the svm of the e1071 package for classification.
> The problem is that I have unbalanced classes e.g. the first one is much
> bigger than the second one and therfore the svm is biased to the first
> class. If I manually adjust the class size the bias disappears.
> The question is then how to include this unequal class distribution to the
> svm (e.g. via wheights or costs)?
>
> Yours,
> Frank
More information about the R-help
mailing list