Detecting Mental Stress Using K-NN Classifier and IoT Devices
摘要
Mental tension has become a constant in the fast-paced world of today. It is a problem that keeps getting worse and, if left unchecked, could have serious health effects. Consequently, it is of highest importance to detect stress in individuals to prevent any detrimental results. With its sophisticated algorithms and skills, machine learning can be essential in solving this problem. In this study, a theoretical framework for stress detection using wearable technology with machine learning algorithms and other cutting-edge features is proposed. Heart rate variability (HRV) and speech emotion recognition (SER), two crucial modules that help identify stress in people, are implemented in the proposed system. The SER module detects the emotions in speech, whereas the HRV module examines fluctuations in heart rate. It is anticipated that the suggested system will offer a precise and trustworthy stress detection method, opening the door to better health results. HRV for short is a method to help identifying stress. Many machine learning classification techniques, including logistic regression, k-nearest neighbors, random forest classifier, decision tree classifier, and neural network classifier (NNC), are used to create this particular module. The k-NN model outperformed the other algorithms, scoring a 99.7% accuracy rate. The Python programming language was chosen because of its abundance of libraries and header files to make implementation easier. Streamlit, an open-source app framework used in the domains of machine learning and data science for developing apps connected to ML modules, was used to deploy the HRV module locally.