Tarca Adi Laurentiu
2005-Apr-06 19:22 UTC
[R] nnet classification using unbalanced classes
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