Optimization of a New Adaptive Stacking Ensemble Model Integrated with IoT for Stress Level Detection Based on Physiological Signals
DOI:
https://doi.org/10.29207/resti.v10i1.6770Keywords:
IoT, mental health, optuna, physiological data, stacking ensembleAbstract
Mental health issues among college students are receiving increasing attention, particularly because of academic and social pressures and the impact of technology use. This study aims to develop a real-time stress level prediction model using a New Adaptive Stacking Ensemble approach based on physiological data and IoT devices. The data included heart rate, SpO₂, body temperature, and systolic and diastolic blood pressure. Five machine learning algorithms are used as base models: SVM, C4.5, Decision Tree, KNN, and Random Forest. The MLP serves as the meta-model, which is then optimized using Optuna. The model training process begins with pre-processing, feature standardization using StandardScaler, and data balancing using SMOTE. The results showed that the stacking model with the MLP meta-model achieved an accuracy of 90.00% under the individual Random Forest and KNN models, and increased to 97.00% after hyperparameter optimization. This model was then integrated with IoT devices using MAX30102, MLX90614, and digital tensiometer sensors, as well as a Streamlit interface to display real-time stress classification results. The system built not only excels in accuracy but can also be implemented to directly detect stress levels, thereby potentially supporting early intervention and mental health promotion in campus environments.
Downloads
References
S.-I. Kim et al., “Association of parental depression with adolescent children’s psychological well-being and health behaviors,” BMC Public Health, vol. 24, no. 1, p. 1412, 2024, doi: 10.1186/s12889-024-18337-9.
A. Juliansen, R. S. Heriyanto, M. P. Muljono, C. L. Budiputri, Y. D. S. Sagala, and G. S. Octavius, “Mental health issues and quality of life amongst school-based adolescents in Indonesia,” J. Med. Surgery, Public Heal., vol. 2, p. 100062, 2024, doi: https://doi.org/10.1016/j.glmedi.2024.100062.
M. D. Pham et al., “Mental Health Problems Among Indonesian Adolescents: Findings of a Cross-Sectional Study Utilizing Validated Scales and Innovative Sampling Methods,” J. Adolesc. Heal., vol. 75, no. 6, pp. 929–938, 2024, doi: https://doi.org/10.1016/j.jadohealth.2024.07.016.
N. Murphy, P. Azzopardi, and M. A. Bohren, “Safeguarding youth sexual and reproductive health and rights in the context of increasing climate-related disasters in the Pacific: A scoping review of policies and responses,” Int. J. Disaster Risk Reduct., vol. 86, p. 103561, 2023, doi: https://doi.org/10.1016/j.ijdrr.2023.103561.
C. Conversano et al., “Is Mindfulness-Based Stress Reduction Effective for People with Hypertension? A Systematic Review and Meta-Analysis of 30 Years of Evidence,” Int. J. Environ. Res. Public Health, vol. 18, no. 6, 2021, doi: 10.3390/ijerph18062882.
R. Kindred and G. W. Bates, “The Influence of the COVID-19 Pandemic on Social Anxiety: A Systematic Review,” Int. J. Environ. Res. Public Health, vol. 20, no. 3, 2023, doi: 10.3390/ijerph20032362.
Y. Devis, Y. Irawan, Junadhi, F. Zoromi, Herianto, and M. R. Amartha, “Monitoring System of Heart Rate, Temperature and Infusion in Patients Based on Microcontroller (Arduino Uno),” J. Phys. Conf. Ser., vol. 1845, no. 1, pp. 0–6, 2021, doi: 10.1088/1742-6596/1845/1/012069.
Y. Irawan, Y. Fernando, and R. Wahyuni, “Detecting Heart Rate Using Pulse Sensor As Alternative Knowing Heart Condition,” J. Appl. Eng. Technol. Sci., vol. 1, no. 1, pp. 30–42, 2019, doi: 10.37385/jaets.v1i1.16.
R. Rosdiana, A. Hasibuan, A. Chairani, M. Daud, and M. Sayuti, “Stress Diagnosis System Using Fuzzy Logic Method,” Motiv. J. Mech. Electr. Ind. Eng., vol. 4, no. 3, pp. 355–366, 2022, doi: 10.46574/motivection.v4i3.162.
S. Naqvi, A. Z. Shaikh, T. Altaf, and S. Singh, “Fuzzy Logic Enabled Stress Detection Using Physiological Signals BT - Emerging Technologies in Computing,” in Emerging Technologies in Computing, M. H. Miraz, G. Southall, M. Ali, A. Ware, and S. Soomro, Eds., Cham: Springer International Publishing, 2021, pp. 161–173, doi: https://doi.org/10.3390/s25237108.
M. Amin et al., “ECG-Based Driver’s Stress Detection Using Deep Transfer Learning and Fuzzy Logic Approaches,” IEEE Access, vol. 10, pp. 29788–29809, 2022, doi: 10.1109/ACCESS.2022.3158658.
B. Saputra, A. Utami, E. Edriyansyah, and Y. Irawan, “Expert System For Diagnosing Diseases in Toddlers Using The Certainty Factor Method,” J. Appl. Eng. Technol. Sci., vol. 4, no. 1, pp. 32–41, 2022, doi: 10.37385/jaets.v4i1.916.
O. Vargas-Lopez, C. A. Perez-Ramirez, M. Valtierra-Rodriguez, J. J. Yanez-Borjas, and J. P. Amezquita-Sanchez, “An Explainable Machine Learning Approach Based on Statistical Indexes and SVM for Stress Detection in Automobile Drivers Using Electromyographic Signals,” Sensors, vol. 21, no. 9, 2021, doi: 10.3390/s21093155.
T. G. Troyee, M. F. Karim Khondakar, M. Hasan, and M. H. Chowdhury, “A Comparative Analysis of Different Preprocessing Pipelines for EEG-based Mental Stress Detection,” in 2024 6th International Conference on Electrical Engineering and Information & Communication Technology (ICEEICT), 2024, pp. 370–375. doi: 10.1109/ICEEICT62016.2024.10534380.
H. Fonda, Y. Irawan, R. Melyanti, R. Wahyuni, and A. Muhaimin, “A Comprehensive Stacking Ensemble Approach for Stress Level Classification in Higher Education,” J. Appl. Data Sci., vol. 5, no. 4, pp. 1701–1714, 2024, doi: https://doi.org/10.47738/jads.v5i4.388.
Y. Irawan, “Moving load robot using wifi network and android based,” J. Robot. Control, vol. 2, no. 3, pp. 217–220, 2021, doi: 10.18196/jrc.2382.
R. Wahyuni, J. T. Sentana, Muhardi, and Y. Irawan, “Water level control monitoring based on arduino uno R3 ATMega 238p using Lm016l LCD at STMIK Hang Tuah Pekanbaru,” J. Robot. Control, vol. 2, no. 4, pp. 265–269, 2021, doi: 10.18196/jrc.2489.
Y. Irawan, H. Fonda, E. Sabna, and A. Febriani, “Intelligent quality control of shrimp aquaculture based on real-time system and IoT using mobile device,” Int. J. Eng. Trends Technol., vol. 69, no. 4, pp. 49–56, 2021, doi: 10.14445/22315381/IJETT-V69I4P208.
S. Purwanti, A. Febriani, M. Mardeni, and Y. Irawan, “Temperature Monitoring System for Egg Incubators Using Raspberry Pi3 Based on Internet of Things (IoT),” J. Robot. Control, vol. 2, no. 5, 2021, doi: 10.18196/jrc.25105.
A. R. Abidin, Y. Irawan, and Y. Devis, “Smart Trash Bin for Management of Garbage Problem in Society,” J. Appl. Eng. Technol. Sci., vol. 4, no. 1, pp. 202–208, 2022, doi: 10.37385/jaets.v4i1.1015.
Y. Irawan, E. Sabna, A. F. Azim, R. Wahyuni, N. Belarbi, and M. M. Josephine, “Automatic Chili Plant Watering Based on Internet of Things (Iot),” J. Appl. Eng. Technol. Sci., vol. 3, no. 2, pp. 77–83, 2022, doi: 10.37385/jaets.v3i2.532.
Y. Irawan, A. W. Novrianto, and H. Sallam, “Cigarette Smoke Detection and Cleaner Based on Internet of Things (Iot) Using Arduino Microcontroller and Mq-2 Sensor,” J. Appl. Eng. Technol. Sci., vol. 2, no. 2, pp. 85–93, 2021, doi: 10.37385/jaets.v2i2.218.
R. M. Sari, E. Sabna, R. Wahyuni, and Y. Irawan, “Implementation of open and close a housing gate portal using RFID card,” J. Robot. Control, vol. 2, no. 5, pp. 363–367, Sep. 2021, doi: 10.18196/jrc.25108.
Y. Irawan, R. Wahyuni, and H. Fonda, “Folding Clothes Tool Using Arduino Uno Microcontroller And Gear Servo,” J. Robot. Control, vol. 2, no. 3, pp. 170–174, 2021, doi: 10.18196/jrc.2373.
S. Hadhri, M. Hadiji, and W. Labidi, “A voting ensemble classifier for stress detection,” J. Inf. Telecommun., vol. 8, no. 3, pp. 399–416, 2024, doi: 10.1080/24751839.2024.2306786.
R. Richer et al., “Machine learning-based detection of acute psychosocial stress from body posture and movements,” Sci. Rep., vol. 14, no. 1, pp. 1–19, 2024, doi: 10.1038/s41598-024-59043-1.
Y. Haque et al., “State-of-the-Art of Stress Prediction from Heart Rate Variability Using Artificial Intelligence,” Cognit. Comput., vol. 16, no. 2, pp. 455–481, 2024, doi: 10.1007/s12559-023-10200-0.
A. K. Ahuja, B. P. Mishra, C. Shankar, and T. P. Dubey, “Stress Detection Using Bio-Signal Processing: An Application of IoT and Machine Learning for Old Age Home Residents,” Eng. Proc., vol. 81, no. 1, 2024, doi: 10.3390/engproc2024081012.
E. A. Sağbaş, S. Korukoglu, and S. Ballı, “Real-time stress detection from smartphone sensor data using genetic algorithm-based feature subset optimization and k-nearest neighbor algorithm,” Multimed. Tools Appl., vol. 83, no. 1, pp. 1–32, 2024, doi: 10.1007/s11042-023-15706-1.
S. Reza, R. Amin, R. Yasmin, W. Kulsum, and S. Ruhi, “Heliyon Improving diabetes disease patients classification using stacking ensemble method with PIMA and local healthcare data,” Heliyon, vol. 10, no. 2, p. e24536, 2024, doi: 10.1016/j.heliyon.2024.e24536.
E. Alalwany and I. Mahgoub, “An Effective Ensemble Learning-Based Real-Time Intrusion Detection Scheme for an In-Vehicle Network,” Electron., vol. 13, no. 5, pp. 1–14, 2024, doi: 10.3390/electronics13050919.
G. Taskasaplidis, D. A. Fotiadis, and P. D. Bamidis, “Review of Stress Detection Methods Using Wearable Sensors,” IEEE Access, vol. 12, no. December 2023, pp. 38219–38246, 2024, doi: 10.1109/ACCESS.2024.3373010.
R. Wahyuni, Herianto, Ikhtiyaruddin, and Y. Irawan, “IoT-Based Pulse Oximetry Design as Early Detection of Covid-19 Symptoms,” Int. J. Interact. Mob. Technol., vol. 17, no. 3, pp. 177–187, 2023, doi: 10.3991/ijim.v17i03.35859.
I. Moraiti and A. Drigas, “Measuring the stress of autistic people with the help of a smartwatch, Internet of Things Technology,” Brazilian J. Sci., vol. 3, no. 2, pp. 45–56, 2024, doi: 10.14295/bjs.v3i2.466.
Herianto, B. Kurniawan, Z. H. Hartomi, Y. Irawan, and M. K. Anam, “Machine Learning Algorithm Optimization using Stacking Technique for Graduation Prediction,” J. Appl. Data Sci., vol. 5, no. 3, pp. 1272–1285, 2024, DOI: https://doi.org/10.47738/jads.v5i3.316.
U. M. Butt et al., “Machine Learning Based Diabetes Classification and Prediction for Healthcare Applications,” vol. 2021, 2021, doi: https://doi.org/10.1155/2021/9930985.
M. A. Rahim, M. A. Hossain, M. N. Hossain, J. Shin, and K. S. Yun, “Stacked Ensemble-Based Type-2 Diabetes Prediction Using Machine Learning Techniques,” Ann. Emerg. Technol. Comput., vol. 7, no. 1, pp. 30–39, 2023, doi: 10.33166/AETiC.2023.01.003.
N. Singh and P. Singh, “ScienceDirect Stacking-based multi-objective evolutionary ensemble framework for prediction of diabetes mellitus,” Integr. Med. Res., pp. 1–22, 2019, doi: 10.1016/j.bbe.2019.10.001.
K. Kannadasan, D. R. Edla, and V. Kuppili, “Type 2 diabetes data classi fi cation using stacked autoencoders in deep neural networks,” Clin. Epidemiol. Glob. Heal., vol. 7, no. October 2018, pp. 530–535, 2019, doi: 10.1016/j.cegh.2018.12.004.
U. Rahmalisa, A. Febriani, and Y. Irawan, “Detector leakage gas LPG based on telegram notification using wemos D1 and MQ-6 sensor,” J. Robot. Control, vol. 2, no. 4, pp. 287–290, 2021, doi: 10.18196/jrc.2493.
Khairunisa, Mardeni, and Y. Irawan, “Smart aquarium design using raspberry Pi and android based,” J. Robot. Control, vol. 2, no. 5, pp. 368–372, 2021, doi: 10.18196/jrc.25109.
M. K. Anam et al., “Sara Detection on Social Media Using Deep Learning Algorithm Development,” J. Appl. Eng. Technol. Sci., vol. 6, no. 1, pp. 225–237, Dec. 2024, doi: 10.37385/jaets.v6i1.5390.
A. Lubis, Y. Irawan, Junadhi, and S. Defit, “Leveraging K-Nearest Neighbors with SMOTE and Boosting Techniques for Data Imbalance and Accuracy Improvement,” J. Appl. Data Sci., vol. 5, no. 4, pp. 1625–1638, 2024, doi: 10.47738/jads.v5i4.343.
M. K. Anam, A. Yunianta, H. J. Alyamani, Erlin, A. Zamsuri, and M. B. Firdaus, “Analysis and Identification of Non-Impact Factors in Smart City Readiness Using Technology Acceptance Analysis: a Case Study in Kampar District, Indonesia,” J. Appl. Eng. Technol. Sci., vol. 5, no. 1, pp. 1–17, 2023, doi: 10.37385/jaets.v5i1.2401.
A. Febriani, R. Wahyuni, Y. Irawan, and R. Melyanti, “Improved Hybrid Machine and Deep Learning Model for Optimization of Smart Egg Incubator,” J. Appl. Data Sci., vol. 5, no. 3, pp. 1052–1068, 2024, doi: https://doi.org/10.47738/jads.v5i3.304.
J. O. Oyoo, J. S. Wekesa, and K. O. Ogada, “Predicting Road Traffic Collisions Using a Two-Layer Ensemble Machine Learning Algorithm,” 2024, doi: https://doi.org/10.3390/asi7020025.
J. Niyogisubizo, L. Liao, E. Nziyumva, E. Murwanashyaka, and P. Claver, “Computers and Education : Artificial Intelligence Predicting student ’ s dropout in university classes using two-layer ensemble machine learning approach : A novel stacked generalization,” Comput. Educ. Artif. Intell., vol. 3, no. November 2021, p. 100066, 2022, doi: 10.1016/j.caeai.2022.100066.
A. Daza, J. Carlos, H. Miranda, J. Bobadilla, C. Fidel, and S. Ponce, “Predicting the depression in university students using stacking ensemble techniques over oversampling method,” Informatics Med. Unlocked, vol. 41, no. June, 2023, doi: 10.1016/j.imu.2023.101295.
M. Hasan, P. A. Bath, C. Marincowitz, L. Sutton, R. Pilbery, and F. Hopfgartner, “Pre-hospital prediction of adverse outcomes in patients with suspected COVID-19 : Development , application and comparison of machine learning and deep learning methods,” Comput. Biol. Med. J., vol. 151, no. May, 2022, DOI: 10.1016/j.compbiomed.2022.106024.
Downloads
Published
Issue
Section
License
Copyright in each article belongs to the author
- The author acknowledges that the RESTI Journal (System Engineering and Information Technology) is the first publisher to publish with a license Creative Commons Attribution 4.0 International License.
- Authors can enter writing separately, arrange the non-exclusive distribution of manuscripts that have been published in this journal into other versions (eg sent to the author's institutional repository, publication in a book, etc.), by acknowledging that the manuscript has been published for the first time in the RESTI (Rekayasa Sistem dan Teknologi Informasi) journal ;





