Thread Subject: disable validation on the neual network

Subject: disable validation on the neual network

From: Mak K

Date: 28 Apr, 2009 20:23:01

Message: 1 of 11

I was using Matlab 7.5 neural network, in which i can disable the validation in training by
net=train(net,P,T,[],[],[],[]);
the [],[],[],[] disables the validation

but now on Matlab 7.6 2008a, the that is not acceptable
it will accept
net=train(net,P,T,[],[]);
but that doesn't disable the validation

can any body tell me how to disable validation in train of newff on Matlab 2008a ?
any suggestions are welcomed

Subject: disable validation on the neual network

From: Greg Heath

Date: 28 Apr, 2009 21:19:36

Message: 2 of 11

On Apr 28, 4:23=A0pm, "Mak K" <mak3...@yahoo.com> wrote:
> I was using Matlab 7.5 neural network, in which i can disable the validat=
ion in training by
> net=3Dtrain(net,P,T,[],[],[],[]);
> the [],[],[],[] disables the validation
>
> but now on Matlab 7.6 2008a, the that is not acceptable
> it will accept
> net=3Dtrain(net,P,T,[],[]);
> but that doesn't disable the validation
>
> can any body tell me how to disable validation in train of newff on Matla=
b 2008a ?
> any suggestions are welcomed

My interpretation of what you are saying is nonsensical.
How can it obtain validation results when you have not
specified a validation set??

Please clarify.

Greg

Subject: disable validation on the neual network

From: Mak K

Date: 28 Apr, 2009 21:43:02

Message: 3 of 11


> My interpretation of what you are saying is nonsensical.
> How can it obtain validation results when you have not
> specified a validation set??
>
> Please clarify.
>
> Greg

the train function randomly divides the train data set into:
60% train set
20% test set
20% validation set

Subject: disable validation on the neual network

From: Mak K

Date: 29 Apr, 2009 12:34:02

Message: 4 of 11

Any ideas ?!

Subject: disable validation on the neual network

From: Mak K

Date: 29 Apr, 2009 19:12:01

Message: 5 of 11

I also tried changing that parameter to zero
net.trainParam.max_fail 5 Maximum validation failures
net.trainParam.max_fail =0;
but matlab retrned error "it must be integer"

then I tried to over train it by
net.trainParam.max_fail0;

it over trains but it keeps the values of wiegth and bias of the 5 validation and restores it at the end of the training for generalization as if it was still set to 5 not 100

so that isn't working too.

can any body point out what I am missing here ?

Subject: disable validation on the neual network

From: Greg Heath

Date: 29 Apr, 2009 12:47:14

Message: 6 of 11

On Apr 29, 8:34 am, "Mak K" <mak3...@yahoo.com> wrote:
> Any ideas ?!

Explicilty eliminate validation by inputting inputs for DIVIDERAND

doc dividerand
help dividerand

Greg

Subject: disable validation on the neual network

From: Greg Heath

Date: 29 Apr, 2009 12:49:25

Message: 7 of 11

On Apr 28, 5:43 pm, "Mak K" <mak3...@yahoo.com> wrote:
> > My interpretation of what you are saying is nonsensical.
> > How can it obtain validation results when you have not
> > specified a validation set??
>
> > Please clarify.
>
> > Greg
>
> the train function randomly divides the train data set into:
> 60% train set
> 20% test set
> 20% validation set

Then you should overide the default setting.that causes this.

doc train
help train

Hope this helps.

Greg

Subject: disable validation on the neual network

From: Greg Heath

Date: 29 Apr, 2009 12:34:07

Message: 8 of 11

On Apr 28, 5:43 pm, "Mak K" <mak3...@yahoo.com> wrote:
> > My interpretation of what you are saying is nonsensical.
> > How can it obtain validation results when you have not
> > specified a validation set??
>
> > Please clarify.
>
> > Greg
>
> the train function randomly divides the train data set into:
> 60% train set
> 20% test set
> 20% validation set

2009a TRAIN documentation on mathworks,com indicates
that DIVIDERAND is a default selection. The 60/20/20 split
is probably a DIVIDERAND default. So it looks like you have
to explicity overide the defaults.

Hope this helps.

Greg

Subject: disable validation on the neual network

From: Mak K

Date: 30 Apr, 2009 16:48:01

Message: 9 of 11


> 2009a TRAIN documentation on mathworks,com indicates
> that DIVIDERAND is a default selection. The 60/20/20 split
> is probably a DIVIDERAND default. So it looks like you have
> to explicity overide the defaults.
>
> Hope this helps.
>
> Greg

thanks Greg
you pointed me to the right direction

net.divideFcn = '' ;
this controls the Data Division algorithm type, blank ' ' = don't divide

we can control the ratios by
%net.divideParam.trainRatio = 1;
%net.divideParam.valRatio = 0;
%net.divideParam.testRatio = 0;

so, this problem is solved :)

Subject: disable validation on the neual network

From: Greg Heath

Date: 5 May, 2009 20:45:36

Message: 10 of 11

On Apr 30, 12:48 pm, "Mak K" <mak3...@yahoo.com> wrote:
> > 2009a TRAIN documentation on mathworks,com indicates
> > that DIVIDERAND is a default selection. The 60/20/20 split
> > is probably a DIVIDERAND default. So it looks like you have
> > to explicity overide the defaults.
>
> > Hope this helps.
>
> > Greg
>
> thanks Greg
> you pointed me to the right direction
>
> net.divideFcn = '' ;
> this controls the Data Division algorithm type, blank ' ' = don't divid=
e
>
> we can control the ratios by
> %net.divideParam.trainRatio = 1;
> %net.divideParam.valRatio = 0;
> %net.divideParam.testRatio = 0;
>
> so, this problem is solved :)

Well, maybe you should read the recent post

http://groups.google.com/group/comp.soft-sys.matlab/
msg/3a4ea3eaaf19a141

Hope this helps.

Greg

Subject: disable validation on the neual network

From: Simon

Date: 19 Nov, 2009 20:12:19

Message: 11 of 11

Hi,
On a similar topic, if I have manually divided my test data already as follows (these vectors are filled in later from an Excel spreadsheet, but you get the idea):

% Training Data
trainPix = []; % Inputs
trainRad = []; % Targets

% Validation Data
valPix = [];
valRad = [];

% Test Data
testPix = [];
testRad = [];

Is there a way, when making a new FF network (with newff) to use these vectors as is? I'm reading up on the divideFCN and dividerand functions, but not seeing how to do this. I would like to basically be able to say to the net "here are my training, validation, and testing input/output sets, don't mess around with this ordering."

The reason I am doing this is that I am taking a graduate course on ANNs and for part of a project, I am expected to display the effects of varying the number of nodes on the accuracy. This is obviously difficult to do when the data sets are being randomly reselected each time, so would like to fix them as shown above, and then play around with network parameters such as number of hidden nodes, training function, etc to show the effects.

Thanks in advance.

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
dividefcn Simon Silk 19 Nov, 2009 15:14:10
dividerand Simon Silk 19 Nov, 2009 15:14:10
newff Simon Silk 19 Nov, 2009 15:14:09
validation disa... Mak K 30 Apr, 2009 12:49:03
rssFeed for this Thread

Contact us at files@mathworks.com