```Path: news.mathworks.com!not-for-mail
From: "Greg Heath" <heath@alumni.brown.edu>
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\$1@newscl01ah.mathworks.com>
References: <khnfpv\$bo4\$1@newscl01ah.mathworks.com>
Reply-To: "Greg Heath" <heath@alumni.brown.edu>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1363136409 24542 172.30.248.37 (13 Mar 2013 01:00:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 13 Mar 2013 01:00:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2929937
Xref: news.mathworks.com comp.soft-sys.matlab:790993

"srishti" wrote in message <khnfpv\$bo4\$1@newscl01ah.mathworks.com>...
> 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.

Greg
```