Entering edit mode
8.7 years ago
brunaz
▴
20
Dear all,
That is my first experience with neural networks so I appreciate any possible help or tips.
I have a datset with 332 columns providing integer infomation, such as 0 or 1 (binary).
The last column classifies each example (row) in a superfamily. For example,
row 1: 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 Superfamily1
row 2: 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 Superfamily2
What I am trying to do is, based on the binary information (all columns except the last one), predict the Superfamily. I have a train dataset and a test one.
I have tried doing that:
*attach(train)
creditnet <- neuralnet(Superfamily~., train, hidden = 4, lifesign = "minimal", linear.output = FALSE, threshold = 0.1)*
But I get an error message:
*Error in terms.formula(formula) :
'.' in formula and no argument 'data'*
What should I do? What am I doing wrong?
Thank you in advance!
and on a separate note, please don't use 'attach'
First of all, Thank you very much! I appreciate your help! I've tried to follow your tips, however now I get another error message:
Would you mind helping me with that too? Thank you again!
Does the same thing happen if you type
instead of
in the example I gave you?
Hi Russhh, How to descript the network structure and parameter tuning in your script. Thanks.
First you look at the function calls, then the function definitions. See https://cran.r-project.org/web/packages/neuralnet/neuralnet.pdf .
neuralnet(fo, data = iris, linear.output=FALSE)
implies the following arguments:hidden = 1, threshold = 0.01, stepmax = 1e+05, rep = 1, startweights = NULL, learningrate.limit = NULL, learningrate.factor = list(minus = 0.5, plus = 1.2), learningrate = NULL, lifesign = "none", lifesign.step = 1000, algorithm = "rprop+", err.fct = "sse", act.fct = "logistic", exclude = NULL, constant.weights = NULL, likelihood = FALSE
. 4 years have made a huge difference in neural network applications. There may be better tools for doing this in R (I'm no expert, I was simply trying to get someones code to work)Thanks. I submit a mauscript in which this package was used while the reviewer ask for all kinds details and ask for comprenhsive description to the neural network include strucutre and paramter tuning.