0

I am trying to use Self Organizing Map to split datasets into training, validation and test sets. I created the SOM model,

dimension1 = 10;
dimension2 = 10;
net = selforgmap([dimension1 dimension2],100,3,'hextop','linkdist');
[net, tr] = train(net, cancer);

however when I am trying to partition the dataset using

net.divideParam.trainRatio = 0.6;
net.divideParam.valRatio = 0.2;
net.divideParam.testRatio = 0.2;

I am getting an error

"Error in network/subsasgn>network_subsasgn (line 456) if isempty(err), [net,err]=setDivideParam(net,divideParam); end Error in network/subsasgn (line 10) net = network_subsasgn(net,subscripts,v,netname);"

Could someone please provide me some guidelines how split datasets using SOM in Matlab?

Code Image

Neel
  • 3
  • 4

1 Answers1

0

You can not use trainRatio, valRatio and testRatio in SOM.

These can be used in other neural networks such as MLP.

PyMatFlow
  • 459
  • 4
  • 8
  • Thank you for your answer. I didn't find any answers on how to split data using SOM. Could you please give me some suggestions on how to use SOM to split the datasets into training, validation, and test dataset? – Neel Jun 26 '18 at 07:40
  • SOM is trained using an unsupervised learning algorithm. Competitive learning as opposed to error-correction learning is used. Therefore, You can not use for splitting dataset. I can not understand, why do you want to use SOM? There are better methods such as K-fold, ... – PyMatFlow Jun 26 '18 at 11:02
  • HI, PyMatFLow. Thank you for your reply. I have read some papers where methods like Neyman Sampling used on the stratum created from SOM to create test, train and validation datasets to reduce the variability of the datasets. I was able to generate the stratum from SOM but am not sure how to take data from each stratum and divide it into the training, test and validation datasets. – Neel Jul 12 '18 at 15:09