[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    Re: [R] help ANN
From:       S Ellison <S.Ellison () lgcgroup ! com>
Date:       2013-11-29 13:49:34
Message-ID: A4E5A0B016B8CB41A485FC629B633CED56C98AEE7A () GOLD ! corp ! lgc-group ! com
[Download RAW message or body]

> I would like to create an artificial neural network with R but I don't know its
> parameters jet (number of layers, number of neurons,...).
> I downloaded the package ANN and I use the function "ANNGA", but I'm
> afraid I haven't really created a neural network. In fact, at the end of the
> process I have just this output:
> 
> Call:
> ANNGA.default(x = input, y = output, design = c(1, 3, 1), population = 100,
> mutation = 0.2, crossover = 0.6, maxW = 10, minW = -10, maxGen = 1000,
> error = 0.001)
> 
> **********************************************************
> ******************
> Mean Squared Error------------------------------> 0.01148523
> R2----------------------------------------------> 0.6918387
> Number of generation----------------------------> 1001 Weight range at
> initialization------------------> [ 10 , -10 ] Weight range resulted from the
> optimisation-----> [ 13.58698 , -12.93606 ]
> **********************************************************
> ******************
> 
> Well, I would like to know if there is in ANN a function to *create* a neural
> network and if not, which package I have to download, Nnet?

What you have done is create an ANN object, print it's summary information and then \
discard it.

if you want to keep it and use it for something, assign it to a variable; for \
example:

my.ANN <- ANNGA.default(x = input, y = output, design = c(1, 3, 1), population = 100,
     mutation = 0.2, crossover = 0.6, maxW = 10, minW = -10, maxGen = 1000,
     error = 0.001)

You can then inspect, print, or predict with the object my.ANN. For example, you can \
say simply  predict(my.ANN) 

to see the output values predicted for the inputs you supplied.

This goes for a lot of R fitting functions; they return objects which are printed and \
discarded unless you assign them to something.


S Ellison



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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic