Stress Detection via Keyboard Typing Behaviors by Using Smartphone Sensors and Machine Learning Techniques

J Med Syst. 2020 Feb 17;44(4):68. doi: 10.1007/s10916-020-1530-z.

Abstract

Stress is one of the biggest problems in modern society. It may not be possible for people to perceive if they are under high stress or not. It is important to detect stress early and unobtrusively. In this context, stress detection can be considered as a classification problem. In this study, it was investigated the effects of stress by using accelerometer and gyroscope sensor data of the writing behavior on a smartphone touchscreen panel. For this purpose, smartphone data including two states (stress and calm) were collected from 46 participants. The obtained sensor signals were divided into 5, 10 and 15 s interval windows to create three different data sets and 112 different features were defined from the raw data. To obtain more effective feature subsets, these features were ranked by using Gain Ratio feature selection algorithm. Afterwards, writing behaviors were classified by C4.5 Decision Trees, Bayesian Networks and k-Nearest Neighbor methods. As a result of the experiments, 74.26%, 67.86%, and 87.56% accuracy classification results were obtained respectively.

Keywords: Accelerometer; Classification; Gyroscope; Machine learning; Smartphone; Stress detection.

MeSH terms

  • Accelerometry
  • Adolescent
  • Adult
  • Algorithms
  • Bayes Theorem
  • Female
  • Humans
  • Inositol / analogs & derivatives
  • Machine Learning*
  • Male
  • Reproducibility of Results
  • Smartphone*
  • Social Environment
  • Stress, Psychological / diagnosis*
  • Time Factors
  • Young Adult

Substances

  • cobofitin
  • Inositol