Re: [R] Variables selection in Neural Networks

From: _Fede_ <>
Date: Sun, 27 Apr 2008 06:38:41 -0700 (PDT)

Thanks to answer Matthew. I hope that there is some function because to do all that by hand with so many variables it can be horrible. In addition, how it would make to see those that are not correlated and those that yes. Which is the threshold to decide one or another thing?


Matthew Barber wrote:

> Hi Fede,
> You would have to eliminate the variables less correlated with the
> response variable. And for the explanatory variables to choose those that
> are very correlated to each other. I don't know if exists some function of
> R that does this by you.
> Mathew Barber
> _Fede_ wrote:

>> Hi folks,
>> I want to apply a neural network to a data set to classify the
>> observations in the different classes from a concrete response variable.
>> The idea is to prove different models from network modifying the number
>> of neurons of the hidden layer to control overfitting. But, to select the
>> best model how I can choose the relevant variables? How I can eliminate
>> those that are not significant for the model of neural networks? How I
>> can do this in R? I do this:
>> dataset.nn=nnet(response.variable~., dataset, subset = training, size=1,
>> decay=0.001, linout=F, skip=T, maxit=200, Hess=T)
>> What I am doing is to vary size between 0 and 1 since with a single layer
>> it can learn any type of function or continuous relation between a group
>> of input and output variables. But this only would give me two different
>> models. The ideal would be to reduce the model eliminating
>> nonsignifictive variables. How I can prove other different models?
>> Regards.
>> _Fede_
View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 27 Apr 2008 - 14:16:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 27 Apr 2008 - 14:30:31 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive