Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
NEURAL NET DATA DIVISION BUGS

Subject: NEURAL NET DATA DIVISION BUGS

From: Greg Heath

Date: 1 Mar, 2013 06:31:06

Message: 1 of 1

I tried to design a timeseries neural net without a validation set and a straightforward 80/0/20 per cent ratio for the train/val/test data division split. The corresponding indices for a timeseries data set of size 100 should be

[ trainInd, valInd, testInd] = [ 1:80 , [] , 81:100 ]

I started with the most obvious command

[ trainInd, valInd, testInd] = divideblock(100, 0.8, 0.0, 0.2);

which bombed. I then tried the following variations. The resulting data splits are given:

[trainInd,valInd,testInd] = divideblock( 100) % 70/15/15

[trainInd,valInd,testInd] = divideblock( 100, 0.8) % 74/13/13

[trainInd,valInd,testInd] = divideblock( 100, 0.8, 0.0 ) % ERROR

[trainInd,valInd,testInd] = divideblock( 100, 0.8, 0.0, 0.2) % ERROR

[trainInd,valInd,testInd] = divideblock(100, 0.8, [], 0.2) %ERROR

Curious, I tried the same inputs on the other divide functions. However

1. 'divideind' never worked
2. 'dividetrain' cannot produce val or test indices
3. 'dividerand' does not produce sequential indices
4. 'divideint' produced the following results

[trainInd,valInd,testInd] = divideint( 100) % 70/15/15
[trainInd,valInd,testInd] = divideint( 100, 0.8) % 72/14/14
[trainInd,valInd,testInd] = divideint( 100, 0.8, 0.0 ) % 87/0/13
[trainInd,valInd,testInd] = divideint( 100, 0.8, 0.0, 0.2) % 87/0/13
[trainInd,valInd,testInd] = divideint(100, 0.8, [], 0.2) %ERROR

However, none of these resulted in sequential indices.

It is obvious that these functions need to be debugged.

Meanwhile, what is the best way to impose the 80/0/20 sequential index split?

My guess at a quick fudge is to use 'divideblock' with a 79/1/20 or 80/1/19 split and

net.trainParam.max_fail = net.trainParam.epochs % or just a large No.

Hope this helps.

Greg

Tags for this Thread

No tags are associated with this thread.

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.

Contact us