Thread Subject: help me to train the following in neuralnetwork

Subject: help me to train the following in neuralnetwork

From: Steve

Date: 12 Nov, 2007 11:15:55

Message: 1 of 11


Hello all,

I tried to train the foll. network i got an error,could
anybodysuggest me,


[P]=[p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 ];

[T]=[t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 ];
 
[NVarin Ncases]=size(P)
[NVarin Ncases]=size(T)
 
  net = newff(minmax(P),[1 0 1],
{'tansig' 'purelin','traingdm'});
 Y = sim(net,P);
 plot(P,T,P,Y,'o')
 hold on
 net.trainParam.epochs = 100;
 net.trainParam.goal = 1e-6;
 net = train(net,P,T);
 Y = sim(net,P);
 plot(P,T,P,Y,'o')

Where pi= 1 x 20
corresponding target ti= 1000 x 2 (i= 1 to 15)

Thankyou.

Subject: help me to train the following in neuralnetwork

From: David

Date: 12 Nov, 2007 12:26:27

Message: 2 of 11

"Steve " <senthilkumaar_s@yahoo.de> wrote in message
<fh9clb$ivr$1@fred.mathworks.com>...
>
> Hello all,
>
> I tried to train the foll. network i got an error,could
> anybodysuggest me,
>
>
> [P]=[p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14
p15 ];
>
> [T]=[t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14
t15 ];
>
> [NVarin Ncases]=size(P)
> [NVarin Ncases]=size(T)
>
> net = newff(minmax(P),[1 0 1],
> {'tansig' 'purelin','traingdm'});
> Y = sim(net,P);
> plot(P,T,P,Y,'o')
> hold on
> net.trainParam.epochs = 100;
> net.trainParam.goal = 1e-6;
> net = train(net,P,T);
> Y = sim(net,P);
> plot(P,T,P,Y,'o')
>
> Where pi= 1 x 20
> corresponding target ti= 1000 x 2 (i= 1 to 15)
>
> Thankyou.

i would suggest that you might want to say what the error
is you got and where.

Subject: help me to train the following in neuralnetwork

From: Steve

Date: 12 Nov, 2007 12:38:36

Message: 3 of 11

The error is in minmax

Subject: help me to train the following in neuralnetwork

From: Steve

Date: 12 Nov, 2007 12:38:43

Message: 4 of 11

The error is in minmax

Subject: help me to train the following in neuralnetwork

From: David

Date: 12 Nov, 2007 13:27:50

Message: 5 of 11

"Steve " <senthilkumaar_s@yahoo.de> wrote in message
<fh9hgj$jj0$1@fred.mathworks.com>...
> The error is in minmax

and just what might the error be?

Subject: help me to train the following in neuralnetwork

From: Steve

Date: 12 Nov, 2007 13:40:56

Message: 6 of 11

I got where the eroor is, but i dot how to overcome now,

The error is in pi matrix , I have both numerical and string
for eg. p1=[1 2 3 4 5 6 7 8 'yes' 10 11 'yes' 3 4 5 ]

how to overcome this ??

Subject: help me to train the following in neuralnetwork

From: David

Date: 12 Nov, 2007 14:05:18

Message: 7 of 11

"Steve " <senthilkumaar_s@yahoo.de> wrote in message
<fh9l58$bui$1@fred.mathworks.com>...
> I got where the eroor is, but i dot how to overcome now,
>
> The error is in pi matrix , I have both numerical and
string
> for eg. p1=[1 2 3 4 5 6 7 8 'yes' 10 11 'yes' 3 4 5 ]
>
> how to overcome this ??

you can overcome it by writing your own function that can
decide which is bigger, 'yes' or 11. and which is
smaller, 'yes' or 1.


Subject: help me to train the following in neuralnetwork

From: Steve

Date: 12 Nov, 2007 16:06:27

Message: 8 of 11

Hi ,

I did as u suggested and now i got some other error,

could u please suggest me how to give the t value in newff
function , bcoz i have two columns as output,

my [T]=[t1 t2....t15]
Size of T matrix is 700 x 30

thank you.

Subject: help me to train the following in neuralnetwork

From: David

Date: 12 Nov, 2007 16:19:52

Message: 9 of 11

"Steve " <johnsonsteve12@yahoo.com> wrote in message
<fh9tm3$r2$1@fred.mathworks.com>...
> Hi ,
>
> I did as u suggested and now i got some other error,
>
> could u please suggest me how to give the t value in
newff
> function , bcoz i have two columns as output,
>
> my [T]=[t1 t2....t15]
> Size of T matrix is 700 x 30
>
> thank you.

exactly what is the error you are getting now?

Subject: help me to train the following in neuralnetwork

From: Steve

Date: 12 Nov, 2007 16:44:06

Message: 10 of 11

Error is:


Input range has 2column matrix

Subject: help me to train the following in neuralnetwork

From: Greg Heath

Date: 14 Nov, 2007 13:14:23

Message: 11 of 11

On Nov 12, 6:15 am, "Steve " <senthilkumaa...@yahoo.de> wrote:
> Hello all,
>
> I tried to train the foll. network i got an error,could
> anybodysuggest me,
>
> [P]=[p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 ];
>
> [T]=[t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 ];
>
> [NVarin Ncases]=size(P)
> [NVarin Ncases]=size(T)

 [NVarout Ncases]=size(T)

Nvarin = Nvarout = 1
Ncases = 15

> net = newff(minmax(P),[1 0 1],
> {'tansig' 'purelin','traingdm'});

[1 0 1] is an error it indicates you have

1 node in the 1st hidden layer
0 nodes in the second hidden layer!
1 output node

What configuration do you really want?

I recommend using one hidden layer via [H 1]
and finding a suitable value for H by trial and error.

> Y = sim(net,P);
> plot(P,T,P,Y,'o')
> hold on
> net.trainParam.epochs = 100;
> net.trainParam.goal = 1e-6;

Why 1e-6? Why not some small fraction of var(T)?

> net = train(net,P,T);
> Y = sim(net,P);
> plot(P,T,P,Y,'o')
>
> Where pi= 1 x 20
> corresponding target ti= 1000 x 2 (i= 1 to 15)

This makes no sense to me.

What are Nvarin, Nvarout and Ncases?

Hope this helps.

Greg

P.S. Searching on

greg-heath pretraining advice

may help

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
neural network Ned Gulley 15 Nov, 2007 23:13:15
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com