Neural Network: Which patterns of the TrainSet does my network ACTUALLY train with?

1 view (last 30 days)
Hi @all,
currently I am using the fitnet function to create a feedforward supervised learning neural network.
I have a total dataset of 8000 patterns.
After manipulating all the parameters and algorithms I decided to force the network to do 1000 training epochs.
I decided to divide the 8000 total patterns in parts of:
  • TrainingSet = 3/8 = 3000 patterns
  • ValidationSet = 3/8 = 3000 patterns
  • TestSet = 2/8 = 2000 patterns
The logical error is the following: If my network has only 1000 training epochs, it only uses 1000 of the 3000 patterns from the 'TrainingSet-pool' and 1000 of the 3000 patterns from the 'ValidationSet-pool'. First of all this means, I wasted 4000 patterns of my datapool.
The next problem is: Within the TrainingSet-pool, how do I find the data which was actually used to train the Network?
If I use the line
testdata = net(input(:,tr.testInd))
testdata has a size of 3000x1, because the line gives back the whole TrainingSet-pool.
How do I find the 1000 samples which were actually used to train the network?
Thanks in advance!

Answers (1)

Prateek Rai
Prateek Rai on 6 Nov 2021
First of all, 1000 epochs do not mean that only 1000 patterns are used to update the weights.
1 epoch completes when all the training patterns are used once to update the weight. Thus, 1000 epochs mean that 1000 times all of the training patterns are used once to update the weight.
You can refer to the following MATLAB Answer post on "What is EPOCH in neural network" to get more idea.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!