KLT for an ECG Signal
The Karhunen–Loeve Transform is the equivalent of PCA analysis for continuous signals, you could seek more informations on this type of Feature extraction.

1/The idea is to compute the covariance matrix on known signals (i don't know, maybe the ECG of a person suffering from a particular heart disease). 

$C = (x-\bar{x})(x-\bar{x})^T$ 

where X is your dataset Matrix (idk, maybe k pattern each composed of N samples), $\bar{x}$ the mean value vector (size : k,1). 

2/ Decompose this matrix in eigenvector ($V$) and eigenvalue ($D$):

$V^{-1}CV = D$ 

3/ Extract the main features (direction of highest variablility), depending on the eigenvalues, let's imagine that the first 7 eigenvalues will represent 99% of the energy used to represent the ECG signals.

4/ Projected data $= [V^T(X-\bar{x})^T]^T$ in a more meaningful feature space  

see : https://machinelearningmastery.com/calculate-principal-component-analysis-scratch-python/