Real-time stress detection from smartphone sensor data using genetic algorithm-based feature subset optimization and k-nearest neighbor algorithm
Citation
Sağbaş, E.A., Korukoglu, S. & Ballı, S. Real-time stress detection from smartphone sensor data using genetic algorithm-based feature subset optimization and k-nearest neighbor algorithm. Multimed Tools Appl (2023). https://doi.org/10.1007/s11042-023-15706-1Abstract
Stress is the mood of pressure and tension that a person feels. Usually, when the pressure on an individual decrease, the body begins to stabilize the state and calm down. Hence, stress detection in real-time is a critical duty in medical systems. However, acquiring physiological data requires additional equipment and is difficult for users to carry with them at all times. Depending on this problem, it is possible to detect stress through behavioral data. Smartphones are devices that provide various behavioral data that people use constantly throughout the day. In this study, a real-time stress detection system based on soft keyboard typing behaviors was developed with the data obtained from linear acceleration, gravity, gyroscope sensors, and a touchscreen panel of the smartphone. 172 attributes were extracted from the raw sensor data. However, such a high number of dimensions could negatively affect the performance of machine learning algorithms. To address this problem, the number of features was reduced by various techniques such as filter-based methods and standard binary-code chromosome Genetic Algorithm as a contribution to this study. Then, writing behaviors were classified with the commonly used machine learning methods namely, C4.5, kNN, and Bayesian Networks. As a result of the experiments, the best classification was obtained from the kNN method using the features selected by the Genetic Algorithm with a classification accuracy of 89.61% and F-Measure of 0.9052. Another contribution of this study is that a mobile service and a relaxation application were developed for stress detection and to reduce stress levels using the selected feature vector.