Preprocessing, analysis and classification of electrocardiogram - an artificial intelligence approach