Near-Sensor Analytics And Machine Learning For Long-Term Wearable Biomedical Systems