I'm working on cardiac arrhythmia detection. Now I want to reduce the ECG signal dimension by using principle component analysis. I have tried some algorithms for this reason, but I get very poor classification results (between 20% to 47%). I don't know if there are mistakes in my method or if PCA even has such a capability? The sample code (matlab) that I have used is :

function [signals,PC,V] = pca(data)

[M,N] = size(data);

mn = mean(data,2);

data = data - repmat(mn,1,N);

covariance = 1 / (N-1) * data * data';

[PC, V] = eig(covariance);

V = diag(V);

[junk, rindices] = sort(-1*V);

V = V(rindices);

PC = PC(:,rindices);

signals = PC' * data;

end

featureVector=max(PC);

I would appreciate if someone could help me.

More Akbar Esmaeelzadeh's questions See All
Similar questions and discussions