Skip to main content
. 2026 Jul 21;16(14):2274. doi: 10.3390/diagnostics16142274
Algorithm 1. Automated non-Delineation Feature Extraction Pipeline
Input: Raw ECG data
X∈RT×12
Output: F∈R10
Step 1: lead selection
Lead II is extracted
x=X:,2∈RT
Whereas X:,2, represents second column for any given row for T samples. Therefore x=RT. The signals are resized s=Resizex,L,s∈RL,
where Resize⋅ denotes truncation for signals longer than L samples and zero-padding for shorter signals.
Step 2: Automatic R-Peak Detection
dmin=max1, fs2, located in R=r1,r2,r3,…rp,, rp∈1,…L,
Step 3: RR Rhythm Descriptors
If P≥2, RR interval vector
q=q1,q2,q3, …qNT∈RN
For qiri+1−rifs i=1,…,N
All RR Descriptors
F1=μq=1N∑i=1Nqi,
F2=σq=1N∑i=1N(qi−μq)2,
F3=RMSq=1N∑i=1Nqi2,
F4=1max(1,N−1)∑i=1N−1I∣qi+1−qi∣>0.05,
If P<2,
F1=F2=F3=F4=0.
Step 4: QRS-Width Proxy Descriptors
If P≥1, the peak-width vector is
w=[w1,w2,…,wK]T∈RK,
where each width is estimated at half-maximum peak prominence.
The extracted descriptors are
F5=μw=1K∑k=1Kwk,
F6=σw=1K∑k=1K(wk−μw)2.
If no valid widths are available,
F5=F6=0.
These are QRS-width proxy descriptors. As such, they do not rely on explicit delineation of the onset and offset of the QRS complexes.
Step 5: Global Spectral Descriptors
The FFT magnitude spectrum of the aligned ECG signal is
m=∣F(s)∣=[m1,m2,…,mL]T∈RL.
The extracted spectral descriptors are
F7=μm=1L∑j=1Lmj,
F8=σm=1L∑j=1L(mj−μm)2,
F9=skewm,
F10=kurtosism.
If
σm=0,
then
F9=F10=0.
Step 6: Feature Vector Assembly
The final handcrafted descriptor vector is
F=F1F2F3F4F5F6F7F8F9F10T∈R10.