A Wavelet Optimization Approach for ECG Signal Classification