DATA MINING
Desktop Survival Guide by Graham Williams |
|||||
> library(nnet) > ?nnet # See example there |
Consider a two-class problem. Build a neural network with
> |
For an unbalanced class, for example where the ratio of class A to
class B is about 3:100, we might decide to weight the
under-represented class:
> sample.nn <- nnet(....... weights=ifelse(ds$class=="A", 100/3, 1) |