A Pattern Recognition Method for Arrhythmia Detection in ECG Signals