Single Lead ECG Classification On Wearable and Implantable Devices