[R] Fwd: missing in neural network

S Ellison S.Ellison at LGCGroup.com
Wed Mar 25 14:52:48 CET 2015


 
> # create formula (without comma index on column names) fm <-
> as.formula(paste("resp ~", paste(colnames(mydata)[1:3110],
> collapse="+")))
> 
> # call neuralnet
> out <- neuralnet(fm,data=mydata, hidden = 4, lifesign = "minimal",
> linear.output = FALSE, threshold = 0.1)

Does neuralnet not recognise '.'? If it does and if you include resp in the data frame, you could drastically simplify the formula, to just resp~. That is:

out <- neuralnet(resp~. , data=cbind(resp, mydata), hidden = 4, lifesign = "minimal",
	linear.output = FALSE, threshold = 0.1)


S Ellison


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}



More information about the R-help mailing list