ECG-Based Heart Rate Variability and KNN Classification for Early Detection of Baby Blues Syndrome in Postpartum Mothers - Megawati, Citra Dewi; Asriningtias, salnan Ratih; Bima Romadhon Parada Dian; Teo Pei Kian; Sutawijaya, Bayu; Fransiska, Ratna Diana (Politeknik Ganesha Medan, 2025)
Early detection of baby blues syndrome plays an important role in preventing postpartum emotional disturbances from developing into more serious mental health conditions. This study proposes a simple and non-invasive approach to identify early signs of baby blues in postpartum mothers by analyzing electrocardiogram (ECG) signals using the K-Nearest Neighbor (KNN) algorithm. The ECG data were gathered through wearable sensors and processed to extract heart rate variability (HRV) features such as RMSSD, SDNN, entropy, and energy. These features were then used to train and test a KNN classification model through a five-fold cross-validation process. KNN was chosen because it is easy to implement, does not assume any specific data pattern, and works well with small datasets like those commonly found in clinical settings. Its ability to group data based on similarity makes it suitable for recognizing subtle physiological changes linked to emotional stress. The model reached an accuracy of 87.5%, with strong precision and recall scores, showing its reliability in distinguishing mothers who show early symptoms of baby blues from those who do not. Among all features, RMSSD and SDNN had the highest impact, pointing to reduced parasympathetic activity in affected individuals. These findings suggest that combining HRV analysis with a straightforward machine learning approach like KNN offers a promising, low-cost solution for early emotional screening in maternal care, especially where resources are limited.