Efficient ECG classification based on Chi-square distance for arrhythmia detection