# RE: [S] NNET question

Bhattacharyya, Arunava, BRGM BRGMS (arunb@att.com)
Wed, 7 Oct 1998 21:07:25 -0400

I am facing a similar problem. I would appreciate if you could forward me
the responses you received to the following question.

Arun Bhattacharyya
Marketing Sciences
AT&T,

> ----------
> From: Thomas J. Downing[SMTP:t_downing@yahoo.com]
> Sent: Wednesday, October 07, 1998 3:29 PM
> To: s-news@wubios.wustl.edu
> Subject: [S] NNET question
>
>
> I am utilizing V & R's nnet library in an attempt to better
> understand neural networks. Although I can make predictions using
> predict.nnet, I do not think I quite understand how predictions are
> derived from the weights given in the output. For example, I have
> fit the following 2-2-1 network :
>
> > z.nnet <- nnet(z ~ x + y,data = ds,size = 2, decay = .007)
> # weights: 9
> initial value 164.278441
> iter 10 value 99.745092
> .
> iter 100 value 97.279519
> final value 97.279519
> stopped after 100 iterations
>
> > summary(z.nnet)
> a 2-2-1 network with 9 weights
> options were - decay=0.007
> b->h1 i1->h1 i2->h1
> 2.16 0.36 3.81
> b->h2 i1->h2 i2->h2
> 5.89 4.91 -2.00
> b->o h1->o h2->o
> 3.46 -5.85 -8.83
>
>
> Given this information, I (naively?) assumed that the forecasting
> equation would be given by:
>
> Z(i) = 3.46 - 5.85 * h1 - 8.83 * h2
>
> where:
> h1 = 2.16 + .36 * x + 3.81 * y
> h2 = 5.89 + 4.91 * x - 2 * y
>
> However, when I use these formulas for prediction, I get very different
> (and obviously very wrong) predictions than those given by
> predict.nnet.
> What am I doing wrong? Thank you in advance for any help with this
> problem!
>
>
>
>
> ==
> -
>
> Thomas J. Downing
> Research Assistant
> Quantitative Research
> Value Line, Inc.
>
> _________________________________________________________
> DO YOU YAHOO!?