[R] nnet classification using unbalanced classes
Tarca Adi Laurentiu
ltarca at biota.rsvs.ulaval.ca
Wed Apr 6 21:22:50 CEST 2005
Hi everybody,
I want to obtain a classification model using the nnet function for a
simple two class problem.
My problem is that number of samples in the first class (n1) is about twice
higher than the one
in class two (n2). I would like to use the weights argument in the nnet
function to equalize the prior probabilities, but I am not
sure which values I should assign.
My first guess would be to set the weights of samples in the larger class
to n2/n1 and those for the second class to 1. Is it
the best thing to do?
Any suggestion would be appreciated.
Laurentiu
More information about the R-help
mailing list