{'fraction_non_alphanumeric': 0.025348542458808618, 'fraction_numerical': 0.0063371356147021544, 'mean_word_length': 5.003802281368821, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Pain Detection using a Smartphone in Real Time*

We developed an objective real-time pain detection method using a smartphone and a wrist-worn wearable device to collect electrodermal activity (EDA) signals. Recently, various researchers have developed pain management applications. However, they rely on subjective self-reported pain scores or the video camera of a smartphone to detect pain, but the latter method’s accuracy needs further improvement. In our work, we use a wrist-worn EDA device which transmits data via Bluetooth to a smartphone. A smartphone application was developed to analyze the EDA data so that near real-time processed pain detection information can be displayed. The analysis of EDA is based on estimating time-varying spectral power in the frequency range (0.08-0.24 Hz) associated with the sympathetic nervous system. This time-varying characterization of EDA is termed TVSymp. In this work, we also examined whether removing baseline EDA fluctuations from TVSymp would provide more accurate results. This was carried out by taking the moving average of the EDA response prior to stimulus and subtracting that value from the EDA response post stimulus. This approach is termed modified TVSymp (MTVSymp). Pain stimuli were induced in ten subjects using a thermal grill, which gives intense pain perception without damaging skin tissues. We compared both TVSymp and MTVSymp in detecting pain induced by the thermal grill using machine learning approaches. We found the accuracy of pain detection of TVSymp and MTVSymp to be 80% and 90%, respectively.