[R] nnet classification using unbalanced classes

From: Tarca Adi Laurentiu <ltarca_at_biota.rsvs.ulaval.ca>
Date: Thu 07 Apr 2005 - 05:22:50 EST

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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Apr 07 05:27:49 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:02 EST