From: "Greg Heath" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: neural network
Date: Wed, 13 Mar 2013 01:00:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <khoj2o$nuu$>
References: <khnfpv$bo4$>
Reply-To: "Greg Heath" <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1363136409 24542 (13 Mar 2013 01:00:09 GMT)
NNTP-Posting-Date: Wed, 13 Mar 2013 01:00:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2929937
Xref: comp.soft-sys.matlab:790993

"srishti" wrote in message <khnfpv$bo4$>...
> hello,
> I am using following code for pattern recognition in neural network,but each time when I run this program accuracy gets changed, can anybody suggest me how to get a constant accuracy?
> x=in;
> t=tar;
> net = patternnet(10)
> net = train(net,x,t);
> view(net)
> y = net(x);
> perf = perform(net,t,y)

By default, 

1. data is randomly divided into training, validation and test sets according to the ratio 0.7/0.15/0.15
2. initial weights are randomly obtained from a subprogram

The easiest solution is to intialize the RNG at the beginning of the program.

Hope this helps.