I want to take a 1-D (ECG) signal of several hundred thousand samples and classify each beat using an SOFM. Currently, I have this:
allfeat = ptrans';
[pc, zscores, pcvars] = princomp(allfeat);
pcvars./sum(pcvars) * 100;
cumsum(pcvars./sum(pcvars) * 100);
P = zscores';
net = newsom([min(P,[],2) max(P,[],2)],[6 6],'gridtop');
nnsize = 36;
net.trainParam.epochs = 3;
net = train(net,P);
distances = dist(P',net.IW{1}');
[d,cndx] = min(distances,[],2);
'allfeat' is a matrix (on the order of 1000x10) of features extracted from the ECG. Each beat has something like ~10 feature coefficients associated with it, and there are on the order of 1000 beats.
Once the SOFM is trained with the initial training set, I can look in the vector 'cndx' to find each beat classified into one of 36 different categories. This result seems to be working ok so far after further manipulation, but what I want to do now is take the knowledge the network has already learned and use it to classify another ~1000x10 feature matrix that it hasn't seen before.
Do I need to retrain it or use adapt()? Or is there something else I need to do?
And, what do I need to do if I want to take an existing trained network an add to its training another vector?
The code above was adapted from MATLAB's 'yeastdemo' to fit my application.
allfeat = ptrans';
[pc, zscores, pcvars] = princomp(allfeat);
pcvars./sum(pcvars) * 100;
cumsum(pcvars./sum(pcvars) * 100);
P = zscores';
net = newsom([min(P,[],2) max(P,[],2)],[6 6],'gridtop');
nnsize = 36;
net.trainParam.epochs = 3;
net = train(net,P);
distances = dist(P',net.IW{1}');
[d,cndx] = min(distances,[],2);
'allfeat' is a matrix (on the order of 1000x10) of features extracted from the ECG. Each beat has something like ~10 feature coefficients associated with it, and there are on the order of 1000 beats.
Once the SOFM is trained with the initial training set, I can look in the vector 'cndx' to find each beat classified into one of 36 different categories. This result seems to be working ok so far after further manipulation, but what I want to do now is take the knowledge the network has already learned and use it to classify another ~1000x10 feature matrix that it hasn't seen before.
Do I need to retrain it or use adapt()? Or is there something else I need to do?
And, what do I need to do if I want to take an existing trained network an add to its training another vector?
The code above was adapted from MATLAB's 'yeastdemo' to fit my application.