Matlab neural network, how to force the use of certain sets for training, validation and testing?

StackOverflow https://stackoverflow.com/questions/22505961

  •  17-06-2023
  •  | 
  •  

Question

If you use the GUI nnstart, you provide only input and output, but you can't decide which rows are going to be training, validation and test set because they are chosen randomly. How can they be specified manually?

Was it helpful?

Solution

You can use any of the GUI's launched from NNSTART to create some sample training code. Then customize that code by setting the following data division values:

net.divideFcn = 'divideind'; % Divide data by indices (i.e. not randomly)
net.divideParam.trainInd = [... training indices you want ...];
net.divideParam.valInd = [... training indices you want ...];
net.divideParam.testInd = [... training indices you want ...];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top