# Preprocessing of ECGs for classification of ventricular arrhythmia

17 views (last 30 days)
Explorer on 1 Feb 2016
Commented: Star Strider on 19 Feb 2016
I have coded preprocessing mentioned in this research paper . Is my preprocessing code correct? Am I going in right direction?
Please bother to run my code on random recordings of NSR, CU Ventricular Tacharrhythmia, MIT BIH SupraVentricular Arrhythmia and MIT BIH Malignant Ventricular Ectopy. These recording are available to download from PhysioNet ECG Data-set. I am referring external link because data-set is more than 5MB.
If code is correct and I am going in right direction, how should I proceed?
Should I concatenate 500 milli sec windows of signals and start Feature Extraction?
My pre-processioning code is named as code5.m By default sampling frequency of NSR and Supraventricular ECGs is 128 Hz and for others it's 250 Hz.
##### 2 CommentsShowHide 1 older comment
Explorer on 2 Feb 2016
@ Star Strider
I have attached research paper but PhysioNet ECG Data-set size is more than 5 MB. How can I upload files that are greater than 5 MB?

Star Strider on 2 Feb 2016
I would not use the Symbolic Math Toolbox at all for signal processing, unless it involved a one-off derivation that I would then transform to a numeric calculation.
Here:
[q, r] = quorem(sym(nu), sym(ss)) ;% quotient
you apparently want to divide the length of the signal by 4*Fs and get the quotient and remainder. It’s much faster to do this numerically:
q = fix(nu/ss);
r = rem(nu,ss);
Here:
for k= 1:size(splitedParts,2);
y_nsr16265(:,k)= filtfilt(b,a,splitedParts (:,k) ) ;
end
I would filter the entire signal first, then split it. That reduces the effect of end transients that can be part of any filtering procedure. I would also use the second-order-section (‘sos,g’) implementation for stability, rather than using the transfer function coefficients.
Beyond that, while I do not agree with the preprocessing procedure in the paper (and the reason I advised you to do it differently), your code looks acceptable. You need to test it to see if it produces the results you want, and change it if it does not.
Star Strider on 19 Feb 2016
As always, my pleasure!