<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.0 20040830//EN" "http://dtd.nlm.nih.gov/publishing/2.0/journalpublishing.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" dtd-version="2.0">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">JMU</journal-id>
      <journal-id journal-id-type="nlm-ta">JMIR Mhealth Uhealth</journal-id>
      <journal-title>JMIR mHealth and uHealth</journal-title>
      <issn pub-type="epub">2291-5222</issn>
      <publisher>
        <publisher-name>JMIR Publications</publisher-name>
        <publisher-loc>Toronto, Canada</publisher-loc>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="publisher-id">v9i5e25258</article-id>
      <article-id pub-id-type="pmid">33949957</article-id>
      <article-id pub-id-type="doi">10.2196/25258</article-id>
      <article-categories>
        <subj-group subj-group-type="heading">
          <subject>Original Paper</subject>
        </subj-group>
        <subj-group subj-group-type="article-type">
          <subject>Original Paper</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>Pain Assessment Tool With Electrodermal Activity for Postoperative Patients: Method Validation Study</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="editor">
          <name>
            <surname>Buis</surname>
            <given-names>Lorraine</given-names>
          </name>
        </contrib>
      </contrib-group>
      <contrib-group>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Aminifar</surname>
            <given-names>Amir</given-names>
          </name>
        </contrib>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Shubina</surname>
            <given-names>Ivanna</given-names>
          </name>
        </contrib>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Taneja</surname>
            <given-names>Neeraj</given-names>
          </name>
        </contrib>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Firl</surname>
            <given-names>Daniel</given-names>
          </name>
        </contrib>
      </contrib-group>
      <contrib-group>
        <contrib id="contrib1" contrib-type="author" corresp="yes">
          <name name-style="western">
            <surname>Aqajari</surname>
            <given-names>Seyed Amir Hossein</given-names>
          </name>
          <degrees>BSc</degrees>
          <xref rid="aff01" ref-type="aff">1</xref>
          <address>
            <institution>Department of Electrical Engineering and Computer Science</institution>
            <institution>University of California, Irvine</institution>
            <addr-line>2200 Engineering Hall</addr-line>
            <addr-line>Irvine, CA</addr-line>
            <country>United States</country>
            <phone>1 9495379373</phone>
            <email>saqajari@uci.edu</email>
          </address>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0003-1747-6980</ext-link>
        </contrib>
        <contrib id="contrib2" contrib-type="author">
          <name name-style="western">
            <surname>Cao</surname>
            <given-names>Rui</given-names>
          </name>
          <degrees>BSc</degrees>
          <xref rid="aff01" ref-type="aff">1</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0001-9295-8299</ext-link>
        </contrib>
        <contrib id="contrib3" contrib-type="author">
          <name name-style="western">
            <surname>Kasaeyan Naeini</surname>
            <given-names>Emad</given-names>
          </name>
          <degrees>MSc</degrees>
          <xref rid="aff02" ref-type="aff">2</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-7438-2641</ext-link>
        </contrib>
        <contrib id="contrib4" contrib-type="author">
          <name name-style="western">
            <surname>Calderon</surname>
            <given-names>Michael-David</given-names>
          </name>
          <degrees>BS</degrees>
          <xref rid="aff03" ref-type="aff">3</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0001-6824-6945</ext-link>
        </contrib>
        <contrib id="contrib5" contrib-type="author">
          <name name-style="western">
            <surname>Zheng</surname>
            <given-names>Kai</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff04" ref-type="aff">4</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0003-4121-4948</ext-link>
        </contrib>
        <contrib id="contrib6" contrib-type="author">
          <name name-style="western">
            <surname>Dutt</surname>
            <given-names>Nikil</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff02" ref-type="aff">2</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-3060-8119</ext-link>
        </contrib>
        <contrib id="contrib7" contrib-type="author">
          <name name-style="western">
            <surname>Liljeberg</surname>
            <given-names>Pasi</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff05" ref-type="aff">5</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-9392-3589</ext-link>
        </contrib>
        <contrib id="contrib8" contrib-type="author">
          <name name-style="western">
            <surname>Salanterä</surname>
            <given-names>Sanna</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff06" ref-type="aff">6</xref>
          <xref rid="aff07" ref-type="aff">7</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0003-2529-6699</ext-link>
        </contrib>
        <contrib id="contrib9" contrib-type="author">
          <name name-style="western">
            <surname>Nelson</surname>
            <given-names>Ariana M</given-names>
          </name>
          <degrees>MD</degrees>
          <xref rid="aff03" ref-type="aff">3</xref>
          <xref rid="aff08" ref-type="aff">8</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0003-1575-1635</ext-link>
        </contrib>
        <contrib id="contrib10" contrib-type="author">
          <name name-style="western">
            <surname>Rahmani</surname>
            <given-names>Amir M</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff01" ref-type="aff">1</xref>
          <xref rid="aff02" ref-type="aff">2</xref>
          <xref rid="aff09" ref-type="aff">9</xref>
          <xref rid="aff10" ref-type="aff">10</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0003-0725-1155</ext-link>
        </contrib>
      </contrib-group>
      <aff id="aff01">
        <label>1</label>
        <institution>Department of Electrical Engineering and Computer Science</institution>
        <institution>University of California, Irvine</institution>
        <addr-line>Irvine, CA</addr-line>
        <country>United States</country>
      </aff>
      <aff id="aff02">
        <label>2</label>
        <institution>Department of Computer Science</institution>
        <institution>University of California, Irvine</institution>
        <addr-line>Irvine, CA</addr-line>
        <country>United States</country>
      </aff>
      <aff id="aff03">
        <label>3</label>
        <institution>Department of Anesthesiology and Perioperative Care</institution>
        <institution>University of California, Irvine</institution>
        <addr-line>Irvine, CA</addr-line>
        <country>United States</country>
      </aff>
      <aff id="aff04">
        <label>4</label>
        <institution>Department of Informatics</institution>
        <institution>University of California, Irvine</institution>
        <addr-line>Irvine, CA</addr-line>
        <country>United States</country>
      </aff>
      <aff id="aff05">
        <label>5</label>
        <institution>Department of Future Technology</institution>
        <institution>University of Turku</institution>
        <addr-line>Turku</addr-line>
        <country>Finland</country>
      </aff>
      <aff id="aff06">
        <label>6</label>
        <institution>Department of Nursing Science</institution>
        <institution>University of Turku</institution>
        <addr-line>Turku</addr-line>
        <country>Finland</country>
      </aff>
      <aff id="aff07">
        <label>7</label>
        <institution>Turku University Hospital</institution>
        <institution>University of Turku</institution>
        <addr-line>Turku</addr-line>
        <country>Finland</country>
      </aff>
      <aff id="aff08">
        <label>8</label>
        <institution>School of Medicine</institution>
        <institution>University of California, Irvine</institution>
        <addr-line>Irvine, CA</addr-line>
        <country>United States</country>
      </aff>
      <aff id="aff09">
        <label>9</label>
        <institution>School of Nursing</institution>
        <institution>University of California, Irvine</institution>
        <addr-line>Irvine, CA</addr-line>
        <country>United States</country>
      </aff>
      <aff id="aff10">
        <label>10</label>
        <institution>Institute for Future Health</institution>
        <institution>University of California, Irvine</institution>
        <addr-line>Irvine, CA</addr-line>
        <country>United States</country>
      </aff>
      <author-notes>
        <corresp>Corresponding Author: Seyed Amir Hossein Aqajari <email>saqajari@uci.edu</email></corresp>
      </author-notes>
      <pub-date pub-type="collection">
        <month>5</month>
        <year>2021</year>
      </pub-date>
      <pub-date pub-type="epub">
        <day>5</day>
        <month>5</month>
        <year>2021</year>
      </pub-date>
      <volume>9</volume>
      <issue>5</issue>
      <elocation-id>e25258</elocation-id>
      <history>
        <date date-type="received">
          <day>25</day>
          <month>10</month>
          <year>2020</year>
        </date>
        <date date-type="rev-request">
          <day>23</day>
          <month>11</month>
          <year>2020</year>
        </date>
        <date date-type="rev-recd">
          <day>18</day>
          <month>1</month>
          <year>2021</year>
        </date>
        <date date-type="accepted">
          <day>25</day>
          <month>3</month>
          <year>2021</year>
        </date>
      </history>
      <copyright-statement>©Seyed Amir Hossein Aqajari, Rui Cao, Emad Kasaeyan Naeini, Michael-David Calderon, Kai Zheng, Nikil Dutt, Pasi Liljeberg, Sanna Salanterä, Ariana M Nelson, Amir M Rahmani. Originally published in JMIR mHealth and uHealth (https://mhealth.jmir.org), 05.05.2021.</copyright-statement>
      <copyright-year>2021</copyright-year>
      <license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/">
        <p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR mHealth and uHealth, is properly cited. The complete bibliographic information, a link to the original publication on https://mhealth.jmir.org/, as well as this copyright and license information must be included.</p>
      </license>
      <self-uri xlink:href="https://mhealth.jmir.org/2021/5/e25258" xlink:type="simple"/>
      <abstract>
        <sec sec-type="background">
          <title>Background</title>
          <p>Accurate, objective pain assessment is required in the health care domain and clinical settings for appropriate pain management. Automated, objective pain detection from physiological data in patients provides valuable information to hospital staff and caregivers to better manage pain, particularly for patients who are unable to self-report. Galvanic skin response (GSR) is one of the physiologic signals that refers to the changes in sweat gland activity, which can identify features of emotional states and anxiety induced by varying pain levels. This study used different statistical features extracted from GSR data collected from postoperative patients to detect their pain intensity. To the best of our knowledge, this is the first work building pain models using postoperative adult patients instead of healthy subjects.</p>
        </sec>
        <sec sec-type="objective">
          <title>Objective</title>
          <p>The goal of this study was to present an automatic pain assessment tool using GSR signals to predict different pain intensities in noncommunicative, postoperative patients.</p>
        </sec>
        <sec sec-type="methods">
          <title>Methods</title>
          <p>The study was designed to collect biomedical data from postoperative patients reporting moderate to high pain levels. We recruited 25 participants aged 23-89 years. First, a transcutaneous electrical nerve stimulation (TENS) unit was employed to obtain patients' baseline data. In the second part, the Empatica E4 wristband was worn by patients while they were performing low-intensity activities. Patient self-report based on the numeric rating scale (NRS) was used to record pain intensities that were correlated with objectively measured data. The labels were down-sampled from 11 pain levels to 5 different pain intensities, including the baseline. We used 2 different machine learning algorithms to construct the models. The mean decrease impurity method was used to find the top important features for pain prediction and improve the accuracy. We compared our results with a previously published research study to estimate the true performance of our models.</p>
        </sec>
        <sec sec-type="results">
          <title>Results</title>
          <p>Four different binary classification models were constructed using each machine learning algorithm to classify the baseline and other pain intensities (Baseline [BL] vs Pain Level [PL] 1, BL vs PL2, BL vs PL3, and BL vs PL4). Our models achieved higher accuracy for the first 3 pain models than the BioVid paper approach despite the challenges in analyzing real patient data. For BL vs PL1, BL vs PL2, and BL vs PL4, the highest prediction accuracies were achieved when using a random forest classifier (86.0, 70.0, and 61.5, respectively). For BL vs PL3, we achieved an accuracy of 72.1 using a k-nearest-neighbor classifier.</p>
        </sec>
        <sec sec-type="conclusions">
          <title>Conclusions</title>
          <p>We are the first to propose and validate a pain assessment tool to predict different pain levels in real postoperative adult patients using GSR signals. We also exploited feature selection algorithms to find the top important features related to different pain intensities.</p>
        </sec>
        <sec sec-type="registered-report">
          <title>International Registered Report Identifier (IRRID)</title>
          <p>RR2-10.2196/17783</p>
        </sec>
      </abstract>
      <kwd-group>
        <kwd>pain assessment</kwd>
        <kwd>recognition</kwd>
        <kwd>health monitoring</kwd>
        <kwd>wearable electronics</kwd>
        <kwd>machine learning</kwd>
        <kwd>electrodermal activity</kwd>
        <kwd>post-op patients</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec sec-type="introduction">
      <title>Introduction</title>
      <p>Pain assessment is a key factor in successful pain management [<xref ref-type="bibr" rid="ref1">1</xref>]. Inaccurate postoperative pain assessment may cause illnesses [<xref ref-type="bibr" rid="ref2">2</xref>] and even long-term chronic issues [<xref ref-type="bibr" rid="ref3">3</xref>]. Pain assessment tools for clinical use are in great demand. If communication ability is limited or even lost due to surgery or illness complications, it is difficult for a doctor to determine the patient's feelings. A proper pain assessment tool can offer an approximate pain level of that patient for further treatment. For now, the wide range of pain assessment methods still cannot determine the precise pain prevalence and levels for adults in hospitals [<xref ref-type="bibr" rid="ref4">4</xref>]. That may cause incorrect treatment and lead to various problems and risks for patients. Painkillers have many side effects, and overtreatment of pain can trigger respiratory depression in the short term or substance use disorder in the long term [<xref ref-type="bibr" rid="ref5">5</xref>]. However, undertreatment of pain may result in chronic pain, more health care costs, and physiological and psychological suffering [<xref ref-type="bibr" rid="ref3">3</xref>,<xref ref-type="bibr" rid="ref6">6</xref>]. All these issues mentioned are prevalent among noncommunicative patients [<xref ref-type="bibr" rid="ref7">7</xref>]. A valid pain assessment tool would be truly transformative to health care delivery as clinicians could deliver pain treatments and assess response in real time. This would decrease unwanted side effects and recovery time from illness or a procedural intervention.</p>
      <p>With the rapid development of Internet-of-Things (IoT) devices, including wearable devices, automated and continuous objective pain intensity assessment is possible [<xref ref-type="bibr" rid="ref8">8</xref>]. The accuracy of these wearable devices has been evaluated in several studies. As an example, Mehrabadi et al [<xref ref-type="bibr" rid="ref9">9</xref>] validated the accuracy of these devices in terms of sleep. Researchers try to identify nervous reaction to pain by monitoring the fluctuation in patients' physiological data, including electromyography, electrocardiography, photoplethysmography, and electrodermal activity (EDA) in real time [<xref ref-type="bibr" rid="ref10">10</xref>,<xref ref-type="bibr" rid="ref11">11</xref>]. Other research uses facial expression and head movement to accompany the physiological data [<xref ref-type="bibr" rid="ref12">12</xref>,<xref ref-type="bibr" rid="ref13">13</xref>]. These methods can quantify pain intensity, especially for poorly communicating patients [<xref ref-type="bibr" rid="ref14">14</xref>]. However, all these methods to date use stimulated pain and were evaluated on healthy participants. Based on this observation, we developed the UCI iHurt Dataset (UCI_iHurtDB) [<xref ref-type="bibr" rid="ref15">15</xref>]. The UCI_iHurtDB is the first multimodal dataset collected from postoperative adult patients suffering from real pain in hospitals. This dataset is planned to be released for research purposes in the near future.</p>
      <p>Skin conductance or the EDA signal is considered a useful biomedical data point that corresponds to pain perception. Our skin produces sweat via over 3 million small tubular sweat glands. Sweat glands are distributed across the body but with the highest densities on the soles of the feet, palms and fingers, and forehead and cheeks. If a patient is exposed to a certain group of stimuli, they can be triggered to secrete moisture, termed emotional sweating. This results in a decrease in skin resistance, or in other words, an increase in skin conductance [<xref ref-type="bibr" rid="ref16">16</xref>], which is also known as EDA or galvanic skin response (GSR). Other than pain, the EDA signal can extract a variety of valuable information from the human body. Rostami et al [<xref ref-type="bibr" rid="ref17">17</xref>] highlighted an important insight that, by using the GSR signal, the biological impact of food on a person’s body can be captured.</p>
      <p>Pain assessment research only using EDA data is limited. Eriksson et al [<xref ref-type="bibr" rid="ref18">18</xref>] and Munsters et al [<xref ref-type="bibr" rid="ref19">19</xref>] validated the relationship between EDA and pain for newborn infants, suitable for automated pain assessment due to their inability to communicate. By monitoring the EDA data during routine blood sampling or care intervention, they found EDA can differentiate between pain and no pain; however, more research is needed to achieve a clinical-grade level. Manivannan et al [<xref ref-type="bibr" rid="ref20">20</xref>] verified whether the EDA could be used as a valid pain indicator for hypnotic analgesia with 10 participants. They used an iron disk to create mechanical pain in a laboratory setup. The experimental results show a clear relation between pain scores and EDA. None of these mentioned works used machine learning algorithms to create a classification model for pain assessment. Furthermore, their dataset includes healthy patients with various stimulus methods to cause pain. In another work, Susam et al [<xref ref-type="bibr" rid="ref21">21</xref>] attempted to assess postoperative pain using EDA through a machine learning model. Their model could distinguish between clinical moderate-to-severe pain and no-pain conditions. However, their work only focused on children as a population.</p>
      <p>To the best of our knowledge, for the first time in this paper, we present an automatic and versatile pain assessment tool to predict different pain levels in postoperative adults using only EDA signals as a physiological signal. In our pain assessment tool, we used 11 different time-domain features extracted from EDA signals for prediction. A feature selection algorithm is used to increase our tool's prediction accuracy and find the top-most important features related to pain intensity. To evaluate our results, we used different types of machine learning algorithms. Machine learning techniques and neural networks have been widely used in health monitoring domains. Zargari et al [<xref ref-type="bibr" rid="ref22">22</xref>] used a combination of convolutional neural networks and recurrent neural networks to accurately track the position of in-mouth nutrient sensors. Mehrabadi et al [<xref ref-type="bibr" rid="ref23">23</xref>] used convolutional neural networks to detect COVID-19 in patients with acute respiratory distress syndrome. These techniques are not limited only to health care domains. Ashrafiamiri et al [<xref ref-type="bibr" rid="ref24">24</xref>] used deep neural networks to secure autonomous driving. To accurately validate our pain assessment algorithm's performance, we compared our results with the accuracy achieved for the pain models presented in [<xref ref-type="bibr" rid="ref13">13</xref>]. Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] used the BioVid Heat Pain database in their work in which participants were subjected to painful heat stimuli under controlled settings. This comparison aims to show that despite all the challenges in real hospital settings, our models can achieve comparable results. This also shows the feasibility of using artificial intelligence–based objective pain assessment for real patients.</p>
    </sec>
    <sec sec-type="methods">
      <title>Methods</title>
      <p>All methods of the study, including the data collection and pain assessment, were approved by the University of California Irvine Institutional Review Board (IRB, HS: 2017-3747). Potential candidates were screened for eligibility using the Acute Pain Service schedule and provided with a copy of the consent form to review for at least 24 hours before participation in research procedures.</p>
      <sec>
        <title>Study Description, Participants, and Recruitment</title>
        <p>This study is a biomedical data collection study with postoperative patients reporting varying degrees of pain symptoms under local IRB approval supervision. We recruited 25 participants (age: 23-89 years) from the University of California, Irvine Medical Center. We recruited similar numbers of men and women (13 men and 12 women). We removed 3 participants' data from the final dataset due to data recording accidents such as excessive motion artifacts induced by hand movements, and 2 participants’ data were excluded since they were wearing the Empatica E4 watch on their IV arm, which resulted in unreliable EDA signal due to conditions such as skin rash and itching. The criteria for participant selection were as follows: (1) 18 years of age or older, (2) would receive a consult by the Acute Pain Service, (3) no barriers to communication, (4) able to provide written informed consent, and (5) have intact and healthy facial skin. Participants were excluded if they had any of the following: (1) any diagnosed condition affecting cognitive function like dementia or psychosis; (2) any diagnosed condition affecting the central nervous system, facial nerves, or muscles; (3) deformities on the hand or other parts of the body that prevent sensor placement; and (4) significant facial hair growth in the area for sensor attachment. Patients were selected if they satisfied the inclusion and exclusion criteria and determined to be enrolled in this study voluntarily. Verbal and written consent was acquired before initiation of the study.</p>
      </sec>
      <sec>
        <title>Study Design</title>
        <p>After the recruitment procedure, GSR data were collected for approximately 30 minutes continuously from the patients in their private room. We separated these 30 minutes of data monitoring into 2 phases. In the first phase, an artificial pain generator called a transcutaneous electrical nerve stimulation (TENS) [<xref ref-type="bibr" rid="ref25">25</xref>] unit was used to let participants have an initial impression of multiple pain levels and let researchers obtain baseline biosignals from the person. The TENS unit stimulates different levels of acute pain by delivering small electrical impulses through electrodes attached to the participant's skin with adhesive pads. Participants were told to gradually increase the TENS unit's intensity to a tolerable level for them and then hold it for at least 10 seconds. After this, we decreased the intensity back to level 0. In the second phase, participants engaged in low-intensity activities such as walking, coughing, sitting up, or lifting legs that caused an expected degree of pain. To improve data reliability for the following analysis, the entire data monitoring process was repeated sequentially. The monitored person's self-report of pain was measured using the Numeric Rating Scale (NRS), a segmented numeric version of the Visual Analogue Scale (VAS). The VAS is a validated, subjective measure for acute and chronic pain. Pain scores are recorded by making a mark on a 10-cm line representing a sequence between “no pain” and “worst pain.” NRS quantifies the pain intensity to 10 levels (0 is no pain, and integers 1 to 10 represent different pain levels, with 10 being the highest pain imaginable) [<xref ref-type="bibr" rid="ref26">26</xref>,<xref ref-type="bibr" rid="ref27">27</xref>].</p>
      </sec>
      <sec>
        <title>Data Collection</title>
        <p>We used the Empatica E4, the commercially available wristband, to monitor the EDA data. The wristband is simple to position, and participants can maneuver easily without the device impeding their movements in any way. The wristband's internal memory allows recording up to 36 hours of data and wireless data transmission. The E4 wristband is rechargeable, with a charging time of fewer than 2 hours. An EDA sensor is embedded in the E4 wristband. This sensor measures the fluctuating changes in certain electrical properties of the skin. </p>
      </sec>
      <sec>
        <title>GSR Feature Extraction Pipeline Architecture</title>
        <p><xref rid="figure1" ref-type="fig">Figure 1</xref> shows our pipeline architecture for preparing the data and extracting the set of features for classification. There are 3 different sections in this pipeline: (1) Data Preparation, (2) pyEDA [<xref ref-type="bibr" rid="ref28">28</xref>], (3) Post Feature Extraction.</p>
        <fig id="figure1" position="float">
          <label>Figure 1</label>
          <caption>
            <p>Galvanic skin response (GSR) feature extraction pipeline. EDA: electrodermal activity.</p>
          </caption>
          <graphic xlink:href="mhealth_v9i5e25258_fig1.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
        </fig>
        <sec>
          <title>Data Preparation</title>
          <p>The primary purpose of the Data Preparation in our pipeline is to synchronize the data with the labels. To prepare the data for feature extraction, we extracted the original signals’ slices that match with their corresponding labels. With this aim, the slices of GSR data and their labels are collected in this part to be fed to the pyEDA for pre-processing and feature extraction.</p>
        </sec>
        <sec>
          <title>pyEDA</title>
          <p>The architecture of the pyEDA is shown in <xref rid="figure2" ref-type="fig">Figure 2</xref>. According to this figure, Preprocessing and Feature Extraction are the 2 main stages in this pipeline.</p>
          <fig id="figure2" position="float">
            <label>Figure 2</label>
            <caption>
              <p>Pipeline architecture of the pyEDA. EDA: electrodermal activity; GSR: galvanic skin response.</p>
            </caption>
            <graphic xlink:href="mhealth_v9i5e25258_fig2.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          </fig>
          <p>In the preprocessing stage of the pyEDA pipeline, at first, the data are down-sampled; then, a moving average is used to smooth the data and reduce the artifacts such as body gestures and movements. In the end, the data are normalized to become suitable for classification models.</p>
          <p>If the GSR data are collected at 128 Hz, it can safely be down-sampled to a 20 Hz sampling rate. This down-sampling has been done to conserve memory and processing time of the data. In this work, we did not down-sample the data since the original data are already sampled at 4 Hz, which is good in terms of time and memory usage.</p>
          <p>In this work, several steps were taken to remove motion artifacts from the GSR signal. First, we used a moving average across a 1-second window to remove the motion artifacts and smooth the data. Second, a low-pass Butterworth filter on the phasic data was applied to remove the line noise. Lastly, preprocessed GSR signals corresponding to each different pain level were visualized to ensure the validity of the signals.</p>
          <p>The pyEDA uses 2 different algorithms for feature extraction (Statistical Feature Extraction and Deep Learning Feature Extraction). The parameters of the Deep Learning Feature Extraction part of the pipeline are set and tuned for stress detection; therefore, in this work, we only used the features extracted by the Statistical Feature Extraction algorithm.</p>
          <p>The number of peaks, the mean, and the max peak amplitude are the 3 different statistical features that are extracted in the pyEDA. The GSR signals consist of 2 main components: skin conductance level, also known as the tonic level of GSR, and skin conductance response, also called the phasic component of GSR. The GSR peaks or bursts are considered the variations in the phasic component of the signal. Therefore, the most important part in extracting the peaks of the GSR signal is to extract its phasic component. Based on <xref rid="figure2" ref-type="fig">Figure 2</xref>, the pyEDA tool uses the cvxEDA algorithm [<xref ref-type="bibr" rid="ref29">29</xref>] to extract the phasic component. Then, the phasic component and the preprocessed GSR data are fed to the Statistical Feature Extraction module to extract the 3 mentioned features (number of peaks, mean GSR, and max peak amplitude).</p>
        </sec>
        <sec>
          <title>Post Feature Extraction</title>
          <p>We also extracted the features that were used in the work by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] for the GSR signals. The preprocessed GSR signals and the set of features (number of peaks, mean GSR, and max peak amplitude) were fed into the Post Feature Extraction module to extract these features.</p>
          <p>The maximum value of the peaks, range, standard deviation, interquartile range, root mean square, mean value of local maxima, mean value of local minima, mean of the absolute values of the first differences, and mean of the absolute values of the second differences are the extra features that were extracted in this part. <xref ref-type="table" rid="table1">Table 1</xref> shows all the extracted features with their descriptions.</p>
          <p>The mean of the absolute values of the first differences (mavfd) is calculated as:</p>
          <graphic xlink:href="mhealth_v9i5e25258_fig3.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          <p>The mean of the absolute values of the second differences (mavsd) is calculated as:</p>
          <graphic xlink:href="mhealth_v9i5e25258_fig4.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          <table-wrap position="float" id="table1">
            <label>Table 1</label>
            <caption>
              <p>Extracted galvanic skin response (GSR) features with their descriptions.</p>
            </caption>
            <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
              <col width="250"/>
              <col width="750"/>
              <thead>
                <tr valign="top">
                  <td>Feature</td>
                  <td>Description</td>
                </tr>
              </thead>
              <tbody>
                <tr valign="top">
                  <td>Number of peaks</td>
                  <td>The number of peaks</td>
                </tr>
                <tr valign="top">
                  <td>Mean</td>
                  <td>The mean value of the signal</td>
                </tr>
                <tr valign="top">
                  <td>Max</td>
                  <td>The maximum value of the peaks</td>
                </tr>
                <tr valign="top">
                  <td>Range</td>
                  <td>The difference between the maximum and the minimum value of the signal</td>
                </tr>
                <tr valign="top">
                  <td>STD</td>
                  <td>Standard deviation of the signal</td>
                </tr>
                <tr valign="top">
                  <td>IQR</td>
                  <td>The difference between upper and lower quartiles of the signal</td>
                </tr>
                <tr valign="top">
                  <td>RMS</td>
                  <td>Root mean square of the signal</td>
                </tr>
                <tr valign="top">
                  <td>Mean minima</td>
                  <td>The mean value of local minima of the signal</td>
                </tr>
                <tr valign="top">
                  <td>Mean maxima</td>
                  <td>The mean value of local maxima of the signal</td>
                </tr>
                <tr valign="top">
                  <td>mavfd</td>
                  <td>The mean of the absolute values of the first differences</td>
                </tr>
                <tr valign="top">
                  <td>mavsd</td>
                  <td>The mean of the absolute values of the second differences</td>
                </tr>
              </tbody>
            </table>
          </table-wrap>
        </sec>
      </sec>
      <sec>
        <title>Classification</title>
        <sec>
          <title>Feature Selection</title>
          <p>One of the key components in machine learning is to select the set of features that has the highest importance in classification. Performing feature selection on the data reduces overfitting, reduces training time, and improves accuracy. By removing the set of features that are not informative for our classification and only add complexity to our model, there is less opportunity to make decisions based on noise, making the model less over-fitted. Fewer data means less training time. In the end, by having more informative data and fewer misleading data, the accuracy of the model increases.</p>
          <p>Random forests [<xref ref-type="bibr" rid="ref30">30</xref>] are among the most popular machine learning methods. They provide 2 methods for feature selection: mean decrease impurity and mean decrease accuracy. In this work, we used a mean decrease impurity method for feature selection.</p>
          <p>Mean decrease impurity is also sometimes called Gini importance. Random forest is an ensemble learning algorithm consisting of several decision trees. The decision tree is a tree-like model of decisions in which every node is a condition on one of the features. These nodes separate the data into 2 different sets so that in the optimal scenario, the data with the same labels end up in the same set. Impurity is the measure based on which the optimal condition is chosen on every node. Mean decrease impurity for each feature is defined as the total decrease in node impurity averaged over all ensemble trees. The features are ranked according to this measure.</p>
        </sec>
        <sec>
          <title>Labeling the Features</title>
          <p><xref ref-type="table" rid="table2">Table 2</xref> shows the distribution of labels in the UCI_iHurtDB. There exists 11 different pain levels in this dataset. It is noticeable that the distribution of different pain levels for the patients is imbalanced (4 occurrences of pain level 10, but 83 occurrences of pain level 4, as an example). This is understandable due to the subjective nature and the different sources of pain among our patients.</p>
          <table-wrap position="float" id="table2">
            <label>Table 2</label>
            <caption>
              <p>Distribution of labels in the UCI_iHurtDB before down-sampling.</p>
            </caption>
            <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
              <col width="500"/>
              <col width="500"/>
              <thead>
                <tr valign="top">
                  <td>Pain level</td>
                  <td>Frequency, n</td>
                </tr>
              </thead>
              <tbody>
                <tr valign="top">
                  <td>PL0</td>
                  <td>37</td>
                </tr>
                <tr valign="top">
                  <td>PL1</td>
                  <td>52</td>
                </tr>
                <tr valign="top">
                  <td>PL2</td>
                  <td>37</td>
                </tr>
                <tr valign="top">
                  <td>PL3</td>
                  <td>61</td>
                </tr>
                <tr valign="top">
                  <td>PL4</td>
                  <td>83</td>
                </tr>
                <tr valign="top">
                  <td>PL5</td>
                  <td>44</td>
                </tr>
                <tr valign="top">
                  <td>PL6</td>
                  <td>32</td>
                </tr>
                <tr valign="top">
                  <td>PL7</td>
                  <td>16</td>
                </tr>
                <tr valign="top">
                  <td>PL8</td>
                  <td>46</td>
                </tr>
                <tr valign="top">
                  <td>PL9</td>
                  <td>26</td>
                </tr>
                <tr valign="top">
                  <td>PL10</td>
                  <td>4</td>
                </tr>
              </tbody>
            </table>
          </table-wrap>
          <p>In the work by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>], there were 5 different pain levels, including the baseline level. To properly compare our pain assessment algorithm with their work, we down-sampled our 11 classes to 5 classes. The key factor in this down-sampling is to ensure that the distribution of the labels is as balanced as possible. As a result, we considered pain levels 1-3 as new pain level 1 (PL1), pain level 4 as new pain level 2 (PL2), pain levels 5-7 as new pain level 3 (PL3), and pain levels 8-10 as new pain level 4 (PL4). Based on <xref ref-type="table" rid="table2">Table 2</xref>, there are only 37 data points for the baseline. To increase the number of samples for the baseline to make our labels more balanced, we up-sampled PL0 based on the reported PL0 data by the patients. We ensured these new baseline data were close enough to the reported pain level 0 labels (less than 10 seconds difference) and had no overlap with other labels. These assumptions were made to make sure (1) we were not reproducing any data and (2) the patients had the same pain level 0 for these new timestamps. By doing this procedure for all the participants, our number of samples for pain level 0 increased from 37 to 86.</p>
          <p><xref ref-type="table" rid="table3">Table 3</xref> shows the distribution of the down-sampled labels and the new baseline. The distribution of the new labels is appropriately balanced. Still, for PL1, the number of samples is slightly higher than the rest of the classes. This is because we down-sampled our pain levels to 4 different classes to make our settings comparable with the work by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>].</p>
          <table-wrap position="float" id="table3">
            <label>Table 3</label>
            <caption>
              <p>Distribution of labels in the UCI_iHurtDB after down-sampling.</p>
            </caption>
            <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
              <col width="500"/>
              <col width="500"/>
              <thead>
                <tr valign="top">
                  <td>Pain level</td>
                  <td>Frequency, n</td>
                </tr>
              </thead>
              <tbody>
                <tr valign="top">
                  <td>PL0</td>
                  <td>86</td>
                </tr>
                <tr valign="top">
                  <td>PL1</td>
                  <td>150</td>
                </tr>
                <tr valign="top">
                  <td>PL2</td>
                  <td>83</td>
                </tr>
                <tr valign="top">
                  <td>PL3</td>
                  <td>92</td>
                </tr>
                <tr valign="top">
                  <td>PL4</td>
                  <td>76</td>
                </tr>
              </tbody>
            </table>
          </table-wrap>
        </sec>
        <sec>
          <title>Machine Learning Algorithms</title>
          <p>We used machine learning–based algorithms to evaluate the performance of our pain assessment algorithm. Two different classification methods were used here: (1) k-nearest-neighbor with <italic>k</italic> between 1 and 20 and (2) random forest with a depth between 1 and 10. The k-nearest-neighbor method uses <italic>k</italic> number of nearest data points and predicts the result based on a majority vote [<xref ref-type="bibr" rid="ref31">31</xref>]. The random forest classifier is an ensemble learning algorithm that fits several decision tree classifiers on various subsamples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting [<xref ref-type="bibr" rid="ref30">30</xref>]. We used the Scikit-learn library to create our classification models [<xref ref-type="bibr" rid="ref32">32</xref>]. Scikit-learn is a free software machine learning library for the Python programming language. It features various classification, regression, and clustering algorithms, including k-nearest-neighbor and random forest.</p>
          <p>To accurately evaluate the performance of our classification models, we used a cross-validation method [<xref ref-type="bibr" rid="ref33">33</xref>]. Cross-validation is one of the most popular algorithms used to truly estimate a machine learning model's accuracy on unseen data. It achieves this by training a model using different subsets of data and obtaining the average accuracy on the rest of the data as a test. In this work, we used leave-one-out cross-validation to evaluate our result. We considered all the data acquired from one of the patients as a test and created our pain model using the rest of the patients. We repeated this procedure for each patient as a test. Each time, we created our pain model from scratch without considering the current test patient data or any information from the previous pain models. The final accuracy of the model was obtained by averaging the accuracy of all constructed pain models.</p>
        </sec>
      </sec>
    </sec>
    <sec sec-type="results">
      <title>Results</title>
      <p>A total of 25 patients with acute pain were engaged by the Acute Pain Service and recruited for this study. Of these 25 participants, 5 were removed from our study due to problems in the data collection process due to rapid hand movements or unreliable EDA signal due to conditions such as skin rash and itching resulting from wearing the Empatica E4 watch on their IV arm. The average age of patients in this study was 54.45 (SD 17.44, range 23-89) years; 55% (11/20) of the patients were male, and 45% (9/20) of patients were female. All patients were taking the standard-of-care postoperative pain medications at the time of the study. Enrolled participants agreed to perform the research protocol for a median of 4 (IQR 3-6) days after surgical intervention. The nature of the procedures for each participant included the following domains: 45% (9/20) general surgery (diagnostic laparoscopy, exploratory laparotomy, and vascular), 15% (3/20) trauma (thoracic pain and rib plating), and 10% (2/20) urology (cystectomy and bladder augmentation). Also, 40% (8/20) of enrolled participants received standard-of-care epidural analgesia provided by the acute pain service team at the time of research participation. The remaining participants were receiving oral and intravenous analgesics for pain control (<xref ref-type="table" rid="table4">Table 4</xref>).</p>
      <table-wrap position="float" id="table4">
        <label>Table 4</label>
        <caption>
          <p>Summary of patients’ demographic characteristics for this study including exclusions.</p>
        </caption>
        <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
          <col width="30"/>
          <col width="470"/>
          <col width="250"/>
          <col width="250"/>
          <thead>
            <tr valign="top">
              <td colspan="2">Variable</td>
              <td>Value</td>
              <td>Range</td>
            </tr>
          </thead>
          <tbody>
            <tr valign="top">
              <td colspan="2">Patients excluded for hand movement noise, n (%)</td>
              <td>3 (12)</td>
              <td>N/A<sup>a</sup></td>
            </tr>
            <tr valign="top">
              <td colspan="2">Patients excluded for IV arm effect, n (%)</td>
              <td>2 (8)</td>
              <td>N/A</td>
            </tr>
            <tr valign="top">
              <td colspan="2">Age (years), mean (SD)</td>
              <td>54.45 (17.44)</td>
              <td>23-89</td>
            </tr>
            <tr valign="top">
              <td colspan="2">Gender, male, n (%)</td>
              <td>11 (55)</td>
              <td>N/A</td>
            </tr>
            <tr valign="top">
              <td colspan="2">Weight (kg), mean (SD)</td>
              <td>75.24 (14.60)</td>
              <td>52.2-102</td>
            </tr>
            <tr valign="top">
              <td colspan="2">Height (cm), mean (SD)</td>
              <td>170.07 (9.00)</td>
              <td>154.9-185.9</td>
            </tr>
            <tr valign="top">
              <td colspan="2">BMI (kg/m<sup>2</sup>), mean (SD)</td>
              <td>26.21 (5.75)</td>
              <td>15.1-38.6</td>
            </tr>
            <tr valign="top">
              <td colspan="2">
                <bold>Nature of the procedure, n (%)</bold>
              </td>
              <td>
                <break/>
              </td>
              <td>
                <break/>
              </td>
            </tr>
            <tr valign="top">
              <td>
                <break/>
              </td>
              <td>General surgery</td>
              <td>9 (45)</td>
              <td>N/A</td>
            </tr>
            <tr valign="top">
              <td>
                <break/>
              </td>
              <td>Orthopedics</td>
              <td>6 (30)</td>
              <td>N/A</td>
            </tr>
            <tr valign="top">
              <td>
                <break/>
              </td>
              <td>Trauma</td>
              <td>3 (15)</td>
              <td>N/A</td>
            </tr>
            <tr valign="top">
              <td>
                <break/>
              </td>
              <td>Urology</td>
              <td>2 (10)</td>
              <td>N/A</td>
            </tr>
          </tbody>
        </table>
        <table-wrap-foot>
          <fn id="table4fn1">
            <p><sup>a</sup>N/A: not applicable.</p>
          </fn>
        </table-wrap-foot>
      </table-wrap>
      <p>To show that our pain assessment algorithm can achieve comparable results to the work by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>], we used identical settings as their work. Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] used 5 different pain levels, including the baseline. They also considered 5.5-second windows for the GSR data. Therefore, in the Data Preparation part of our pipeline, we considered 5.5-second windows for the slices of the GSR data for feature extraction (2.75 seconds before and after each timestamp). Furthermore, as discussed in the Methods section, we down-sampled the pain levels from 11 classes to 5 classes to make them similar with their labels.</p>
      <p>At first, we used the set of features that was used in the work by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] for classification without any feature selection. The maximum value of the peaks, range, standard deviation, interquartile range, root mean square, mean value of local maxima, mean value of local minima, mean of the absolute values of the first differences, and mean of the absolute values of the second differences are the features that were used here.</p>
      <p>We used leave-one-person-out cross-validation using k-nearest-neighbor and random forest algorithms. We reported the accuracy based on 4 different pain models (BL vs PL1, BL vs PL2, BL vs PL3, and BL vs PL4). <xref ref-type="table" rid="table5">Table 5</xref> shows the comparison of the validation accuracy achieved by our classifiers with that by the pain models of Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>].</p>
      <table-wrap position="float" id="table5">
        <label>Table 5</label>
        <caption>
          <p>The validation accuracies in comparison with Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] using the same set of features.</p>
        </caption>
        <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
          <col width="270"/>
          <col width="230"/>
          <col width="250"/>
          <col width="250"/>
          <thead>
            <tr valign="bottom">
              <td>Binary classification</td>
              <td>RF<sup>a</sup></td>
              <td>KNN<sup>b</sup></td>
              <td>Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>]</td>
            </tr>
          </thead>
          <tbody>
            <tr valign="top">
              <td>BL vs PL1</td>
              <td>84.0</td>
              <td>74.4</td>
              <td>55.4</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL2</td>
              <td>66.3</td>
              <td>67.5</td>
              <td>60.2</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL3</td>
              <td>57.2</td>
              <td>65.0</td>
              <td>65.9</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL4</td>
              <td>55.2</td>
              <td>53.0</td>
              <td>73.8</td>
            </tr>
          </tbody>
        </table>
        <table-wrap-foot>
          <fn id="table5fn1">
            <p><sup>a</sup>RF: random forest.</p>
          </fn>
          <fn id="table5fn2">
            <p><sup>b</sup>KNN: k-nearest-neighbor.</p>
          </fn>
        </table-wrap-foot>
      </table-wrap>
      <p>According to these data, for the first 2 pain models (BL vs PL1 and BL vs PL2), we achieved a higher accuracy using both of our classifiers in comparison with Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>]. For the third pain model, our accuracy is also close to their models, with less than 1% difference using the k-nearest-neighbor classifier. For the fourth model, the accuracy of our models was noticeably lower than their models. As the next step, we added 2 more features (the number of peaks and the mean of the GSR data) to our set of features and then selected the most important ones using the mean decrease impurity method to improve the accuracy.</p>
      <p>To obtain the best set of classification features, we ran leave-one-person-out cross-validation on different pain models using random forest classifiers. We computed the Gini importance of the features on the training data and selected the top <italic>k</italic> number of features for training the model and classification (2-11 were considered to be possible values for <italic>k</italic>). Since we had a different number of folds, we could have different sets of features for each fold. We considered the set of features that was used in most of the folds as the final set of features for the current pain model. <xref ref-type="table" rid="table6">Table 6</xref> shows the selected features for each pain model. Descriptions for each of these features can be found in <xref ref-type="table" rid="table1">Table 1</xref>.</p>
      <table-wrap position="float" id="table6">
        <label>Table 6</label>
        <caption>
          <p>Selected set of features for each pain model.</p>
        </caption>
        <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
          <col width="500"/>
          <col width="500"/>
          <thead>
            <tr valign="top">
              <td>Pain models</td>
              <td>Set of features</td>
            </tr>
          </thead>
          <tbody>
            <tr valign="top">
              <td>BL vs PL1</td>
              <td>Mean, max, RMS<sup>a</sup>, and mean maxima</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL2</td>
              <td>Mean, max, RMS, and mean maxima</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL3</td>
              <td>Max and RMS</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL4</td>
              <td>Mean, max, IQR, RMS, and mean maxima</td>
            </tr>
          </tbody>
        </table>
        <table-wrap-foot>
          <fn id="table6fn1">
            <p><sup>a</sup>RMS: root mean square.</p>
          </fn>
        </table-wrap-foot>
      </table-wrap>
      <p>According to this table, the maximum value and root mean square of the signal are 2 features that were selected in all the pain models. The mean value of the local maxima and the mean value of the signal were also selected for all the pain models except the third one. The difference between upper and lower quartiles of the signal (IQR) is a feature that was selected as an important feature for classification only for the BL vs PL4 pain model.</p>
      <p>After the set of features for each pain model were obtained, we ran one-person-leave-out cross-validation for k-nearest neighbor and random forest algorithms using these sets of new selected features to achieve the final results.</p>
      <p><xref ref-type="table" rid="table7">Table 7</xref> shows the validation accuracy comparison of our models with those by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] using feature selection for 5.5-second windows. As shown in this table, by using feature selection, our classifiers' accuracy improved compared to those shown in <xref ref-type="table" rid="table5">Table 5</xref>. For all the pain models except the fourth one, we were able to achieve higher accuracy than the pain models by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>]. For BL vs PL4, our accuracy was still about 10% less than their work. In the Discussion section, we explain the potential reasons for this difference in our model.</p>
      <table-wrap position="float" id="table7">
        <label>Table 7</label>
        <caption>
          <p>Validation accuracies in comparison with the work by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] using feature selection.</p>
        </caption>
        <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
          <col width="270"/>
          <col width="230"/>
          <col width="250"/>
          <col width="250"/>
          <thead>
            <tr valign="bottom">
              <td>Binary classification</td>
              <td>RF<sup>a</sup></td>
              <td>KNN<sup>b</sup></td>
              <td>Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>]</td>
            </tr>
          </thead>
          <tbody>
            <tr valign="top">
              <td>BL vs PL1</td>
              <td>86.0</td>
              <td>76.8</td>
              <td>55.4</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL2</td>
              <td>70.0</td>
              <td>69.1</td>
              <td>60.2</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL3</td>
              <td>69.8</td>
              <td>72.1</td>
              <td>65.9</td>
            </tr>
            <tr valign="top">
              <td>BL vs PL4</td>
              <td>61.5</td>
              <td>60.0</td>
              <td>73.8</td>
            </tr>
          </tbody>
        </table>
        <table-wrap-foot>
          <fn id="table7fn1">
            <p><sup>a</sup>RF: random forest.</p>
          </fn>
          <fn id="table7fn2">
            <p><sup>b</sup>KNN: k-nearest-neighbor.</p>
          </fn>
        </table-wrap-foot>
      </table-wrap>
    </sec>
    <sec sec-type="discussion">
      <title>Discussion</title>
      <sec>
        <title>Strengths</title>
        <p>We are the first to develop an automatic and versatile pain assessment tool using GSR signals to accurately predict different pain intensities in postoperative adult patients. According to our results, using identical settings and even the exact GSR features used in the work by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>], we can achieve higher accuracy in 2 of the 4 different pain models (BL vs PL1 and BL vs PL2). Also, for the third pain model (BL vs PL3), using the k-nearest-neighbor classifier, we can achieve the same level of accuracy with less than 1% difference. Machine learning algorithms and feature selection are not a part of the pain assessment algorithm settings. As a result, to show the true strength of our pain assessment algorithm, first, we added 2 more features to our set of features (the number of peaks and the mean value of the signal). Then, we used the mean decrease impurity method to select the most important features for classification. According to <xref ref-type="table" rid="table7">Table 7</xref>, we can achieve higher accuracy for the first 3 pain models using this procedure. Based on our results, for the first pain model (BL vs PL1), our accuracy is considerably higher than the accuracy achieved by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] (with and without feature selection). By feature selection, we are using a much lower number of features in our pain models. This reduces the complexity of our pain models. </p>
        <p>Furthermore, we present the most important features for each classification model. According to <xref ref-type="table" rid="table5">Table 5</xref>, the maximum value and root mean square of the signal appear to be the 2 most important features for pain classifications for postoperative adult patients. The mean value and mean value of the local maxima of the signal are considered to be the next 2 important features for classification.</p>
        <p>Our results show that, in addition to healthy participants from previous studies, we can detect different intensities of pain using only GSR data in real-life patients in the hospital. GSR data can easily be collected using affordable wearable devices such as the Empatica E4 used in our study. Therefore, our pain assessment algorithm is really beneficial in providing valuable information to hospital staff and caregivers to better manage pain, especially for those patients who cannot communicate.</p>
      </sec>
      <sec>
        <title>Limitations</title>
        <p>As our work's limitations, we used data collected from postoperative adult participants in our pain assessment algorithm. Data collection in real life may have led to more motion artifact noise in our physiological signals than data collection in a lab setting (especially for GSR data collected from Empatica E4 connected to their wrist). The motion artifacts were stronger for higher pain levels since the patient was in more unbearable pain. </p>
        <p>Another limitation in our work can be the lack of balanced pain levels for all the patients. Since our data were collected from real postoperative adult participants, it is possible that the patients in the experiment did not experience and report all different pain levels. This limitation could be more noticeable at higher pain levels.</p>
        <p>Based on our results, we were not able to achieve the accuracy of that by Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>] for BL vs PL4 (with a 10% difference). The limitations mentioned in previous paragraphs can explain the potential reasons behind this difference. </p>
        <p>Furthermore, we could not find a significant difference between different pain levels in our study. We believe this is because the variations in GSR signal response to different pain levels are more alike to be distinguished easily. It is worth mentioning that most state-of-the-art pain assessments mainly focus on comparing baseline with other pain levels (eg, Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>], if the patient is in pain or not).</p>
        <p>According to our results, the accuracy of our pain models generally decreases with increasing pain levels. This is the opposite of the models from Werner et al [<xref ref-type="bibr" rid="ref13">13</xref>]. We believe this is due to our work's limitations mentioned in the earlier paragraph (motion artifact in signals and lack of balanced pain levels for all the patients). Both of these mentioned limitations could be more noticeable at higher pain levels. Therefore, it is understandable that in this work, where the data were collected from postoperative patients in real life, our models' accuracy decreased with increasing pain levels.</p>
      </sec>
      <sec>
        <title>Conclusions</title>
        <p>In conclusion, according to our results, we can evaluate the performance of our pain assessment algorithm. This evaluation shows that it is feasible to predict different pain levels in real postoperative adult participants using only the EDA data. Furthermore, we showed that the mean value, maximum value, root mean square, and mean value of the local maxima of the signal are the most important features for pain classification of real patients in pain. Multimodel pain assessment methods can be implemented as future work to increase our pain assessment models' performance.</p>
      </sec>
    </sec>
  </body>
  <back>
    <app-group/>
    <glossary>
      <title>Abbreviations</title>
      <def-list>
        <def-item>
          <term id="abb1">EDA</term>
          <def>
            <p>electrodermal activity</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb2">GSR</term>
          <def>
            <p>galvanic skin response</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb3">IoT</term>
          <def>
            <p>Internet of Things</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb4">IRB</term>
          <def>
            <p>institutional review board</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb5">NRS</term>
          <def>
            <p>Numeric Rating Scale</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb6">TENS</term>
          <def>
            <p>transcutaneous electrical nerve stimulation</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb7">VAS</term>
          <def>
            <p>Visual Analogue Scale</p>
          </def>
        </def-item>
      </def-list>
    </glossary>
    <ack>
      <p>This research was supported by the Academy of Finland project, Personalized Pain Assessment System based on IoT 313488.</p>
    </ack>
    <fn-group>
      <fn fn-type="conflict">
        <p>None declared.</p>
      </fn>
    </fn-group>
    <ref-list>
      <ref id="ref1">
        <label>1</label>
        <nlm-citation citation-type="book">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Serpell</surname>
              <given-names>M</given-names>
            </name>
          </person-group>
          <source>Handbook of pain management</source>
          <year>2008</year>
          <publisher-loc>New York, NY</publisher-loc>
          <publisher-name>Springer Healthcare</publisher-name>
        </nlm-citation>
      </ref>
      <ref id="ref2">
        <label>2</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Tompkins</surname>
              <given-names>DA</given-names>
            </name>
            <name name-style="western">
              <surname>Hobelmann</surname>
              <given-names>JG</given-names>
            </name>
            <name name-style="western">
              <surname>Compton</surname>
              <given-names>P</given-names>
            </name>
          </person-group>
          <article-title>Providing chronic pain management in the "Fifth Vital Sign" Era: Historical and treatment perspectives on a modern-day medical dilemma</article-title>
          <source>Drug Alcohol Depend</source>
          <year>2017</year>
          <month>04</month>
          <day>01</day>
          <volume>173 Suppl 1</volume>
          <fpage>S11</fpage>
          <lpage>S21</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://linkinghub.elsevier.com/retrieve/pii/S0376-8716(17)30003-0"/>
          </comment>
          <pub-id pub-id-type="doi">10.1016/j.drugalcdep.2016.12.002</pub-id>
          <pub-id pub-id-type="medline">28363315</pub-id>
          <pub-id pub-id-type="pii">S0376-8716(17)30003-0</pub-id>
          <pub-id pub-id-type="pmcid">PMC5771233</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref3">
        <label>3</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>McGreevy</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Bottros</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Raja</surname>
              <given-names>S</given-names>
            </name>
          </person-group>
          <article-title>Preventing Chronic Pain following Acute Pain: Risk Factors, Preventive Strategies, and their Efficacy</article-title>
          <source>Eur J Pain Suppl</source>
          <year>2011</year>
          <month>11</month>
          <day>11</day>
          <volume>5</volume>
          <issue>2</issue>
          <fpage>365</fpage>
          <lpage>372</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://europepmc.org/abstract/MED/22102847"/>
          </comment>
          <pub-id pub-id-type="doi">10.1016/j.eujps.2011.08.013</pub-id>
          <pub-id pub-id-type="medline">22102847</pub-id>
          <pub-id pub-id-type="pmcid">PMC3217302</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref4">
        <label>4</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Gregory</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>McGowan</surname>
              <given-names>L</given-names>
            </name>
          </person-group>
          <article-title>An examination of the prevalence of acute pain for hospitalised adult patients: a systematic review</article-title>
          <source>J Clin Nurs</source>
          <year>2016</year>
          <month>03</month>
          <volume>25</volume>
          <issue>5-6</issue>
          <fpage>583</fpage>
          <lpage>98</lpage>
          <pub-id pub-id-type="doi">10.1111/jocn.13094</pub-id>
          <pub-id pub-id-type="medline">26778249</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref5">
        <label>5</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>McQuay</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Moore</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Justins</surname>
              <given-names>D</given-names>
            </name>
          </person-group>
          <article-title>Treating acute pain in hospital</article-title>
          <source>BMJ</source>
          <year>1997</year>
          <month>05</month>
          <day>24</day>
          <volume>314</volume>
          <issue>7093</issue>
          <fpage>1531</fpage>
          <lpage>5</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://europepmc.org/abstract/MED/9183203"/>
          </comment>
          <pub-id pub-id-type="doi">10.1136/bmj.314.7093.1531</pub-id>
          <pub-id pub-id-type="medline">9183203</pub-id>
          <pub-id pub-id-type="pmcid">PMC2126780</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref6">
        <label>6</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Stites</surname>
              <given-names>M</given-names>
            </name>
          </person-group>
          <article-title>Observational pain scales in critically ill adults</article-title>
          <source>Crit Care Nurse</source>
          <year>2013</year>
          <month>06</month>
          <volume>33</volume>
          <issue>3</issue>
          <fpage>68</fpage>
          <lpage>78</lpage>
          <pub-id pub-id-type="doi">10.4037/ccn2013804</pub-id>
          <pub-id pub-id-type="medline">23727853</pub-id>
          <pub-id pub-id-type="pii">33/3/68</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref7">
        <label>7</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Barr</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Fraser</surname>
              <given-names>GL</given-names>
            </name>
            <name name-style="western">
              <surname>Puntillo</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Ely</surname>
              <given-names>EW</given-names>
            </name>
            <name name-style="western">
              <surname>Gélinas</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Dasta</surname>
              <given-names>JF</given-names>
            </name>
            <name name-style="western">
              <surname>Davidson</surname>
              <given-names>JE</given-names>
            </name>
            <name name-style="western">
              <surname>Devlin</surname>
              <given-names>JW</given-names>
            </name>
            <name name-style="western">
              <surname>Kress</surname>
              <given-names>JP</given-names>
            </name>
            <name name-style="western">
              <surname>Joffe</surname>
              <given-names>AM</given-names>
            </name>
            <name name-style="western">
              <surname>Coursin</surname>
              <given-names>DB</given-names>
            </name>
            <name name-style="western">
              <surname>Herr</surname>
              <given-names>DL</given-names>
            </name>
            <name name-style="western">
              <surname>Tung</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Robinson</surname>
              <given-names>BRH</given-names>
            </name>
            <name name-style="western">
              <surname>Fontaine</surname>
              <given-names>DK</given-names>
            </name>
            <name name-style="western">
              <surname>Ramsay</surname>
              <given-names>MA</given-names>
            </name>
            <name name-style="western">
              <surname>Riker</surname>
              <given-names>RR</given-names>
            </name>
            <name name-style="western">
              <surname>Sessler</surname>
              <given-names>CN</given-names>
            </name>
            <name name-style="western">
              <surname>Pun</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Skrobik</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Jaeschke</surname>
              <given-names>R</given-names>
            </name>
            <collab>American College of Critical Care Medicine</collab>
          </person-group>
          <article-title>Clinical practice guidelines for the management of pain, agitation, and delirium in adult patients in the intensive care unit</article-title>
          <source>Crit Care Med</source>
          <year>2013</year>
          <month>01</month>
          <volume>41</volume>
          <issue>1</issue>
          <fpage>263</fpage>
          <lpage>306</lpage>
          <pub-id pub-id-type="doi">10.1097/CCM.0b013e3182783b72</pub-id>
          <pub-id pub-id-type="medline">23269131</pub-id>
          <pub-id pub-id-type="pii">00003246-201301000-00029</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref8">
        <label>8</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Naeini</surname>
              <given-names>EK</given-names>
            </name>
            <name name-style="western">
              <surname>Shahhosseini</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Subramanian</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Yin</surname>
              <given-names>T</given-names>
            </name>
            <name name-style="western">
              <surname>Rahmani</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Dutt</surname>
              <given-names>N</given-names>
            </name>
          </person-group>
          <article-title>An Edge-Assisted and Smart System for Real-Time Pain Monitoring</article-title>
          <year>2019</year>
          <conf-name>2019 IEEE/ACM International Conference on Connected Health: Applications, Systems and Engineering Technologies (CHASE)</conf-name>
          <conf-date>September 25-27, 2019</conf-date>
          <conf-loc>Arlington, VA</conf-loc>
          <pub-id pub-id-type="doi">10.1109/chase48038.2019.00023</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref9">
        <label>9</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Asgari Mehrabadi</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Azimi</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>Sarhaddi</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>Axelin</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Niela-Vilén</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Myllyntausta</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Stenholm</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Dutt</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Liljeberg</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Rahmani</surname>
              <given-names>AM</given-names>
            </name>
          </person-group>
          <article-title>Sleep Tracking of a Commercially Available Smart Ring and Smartwatch Against Medical-Grade Actigraphy in Everyday Settings: Instrument Validation Study</article-title>
          <source>JMIR Mhealth Uhealth</source>
          <year>2020</year>
          <month>11</month>
          <day>02</day>
          <volume>8</volume>
          <issue>10</issue>
          <fpage>e20465</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://mhealth.jmir.org/2020/10/e20465/"/>
          </comment>
          <pub-id pub-id-type="doi">10.2196/20465</pub-id>
          <pub-id pub-id-type="medline">33038869</pub-id>
          <pub-id pub-id-type="pii">v8i10e20465</pub-id>
          <pub-id pub-id-type="pmcid">PMC7669442</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref10">
        <label>10</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Werner</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Al-Hamadi</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Niese</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Walter</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Gruss</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Traue</surname>
              <given-names>H</given-names>
            </name>
          </person-group>
          <article-title>Towards Pain Monitoring: Facial Expression, Head Pose, a new Database, an Automatic System and Remaining Challenges</article-title>
          <year>2014</year>
          <conf-name>British Machine Vision Conference 2013</conf-name>
          <conf-date>September 9-13, 2013</conf-date>
          <conf-loc>Bristol, England</conf-loc>
          <pub-id pub-id-type="doi">10.5244/c.27.119</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref11">
        <label>11</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Walter</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Gruss</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Ehleiter</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Tan</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Traue</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Crawcour</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Werner</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Al-Hamadi</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Andrade</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Da</surname>
              <given-names>SG</given-names>
            </name>
          </person-group>
          <article-title>The biovid heat pain database: Data for the advancement and systematic validation of an automated pain recognition</article-title>
          <year>2013</year>
          <conf-name>2013 IEEE International Conference on Cybernetics (CYBCO)</conf-name>
          <conf-date>June 13-15, 2013</conf-date>
          <conf-loc>Lausanne, Switzerland</conf-loc>
          <pub-id pub-id-type="doi">10.1109/cybconf.2013.6617456</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref12">
        <label>12</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Hammal</surname>
              <given-names>Z</given-names>
            </name>
            <name name-style="western">
              <surname>Cohn</surname>
              <given-names>JF</given-names>
            </name>
          </person-group>
          <article-title>Automatic detection of pain intensity</article-title>
          <year>2012</year>
          <conf-name>14th ACM international conference on Multimodal interaction</conf-name>
          <conf-date>October 2012</conf-date>
          <conf-loc>Santa Monica, CA</conf-loc>
          <pub-id pub-id-type="doi">10.1145/2388676.2388688</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref13">
        <label>13</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Werner</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Al-Hamadi</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Niese</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Walter</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Gruss</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Traue</surname>
              <given-names>HC</given-names>
            </name>
          </person-group>
          <article-title>Automatic pain recognition from video and biomedical signals</article-title>
          <year>2014</year>
          <conf-name>22nd International Conference on Pattern Recognition</conf-name>
          <conf-date>August 24-28, 2014</conf-date>
          <conf-loc>Stockholm, Sweden</conf-loc>
          <pub-id pub-id-type="doi">10.1109/icpr.2014.784</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref14">
        <label>14</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Herr</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Coyne</surname>
              <given-names>PJ</given-names>
            </name>
            <name name-style="western">
              <surname>McCaffery</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Manworren</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Merkel</surname>
              <given-names>S</given-names>
            </name>
          </person-group>
          <article-title>Pain assessment in the patient unable to self-report: position statement with clinical practice recommendations</article-title>
          <source>Pain Manag Nurs</source>
          <year>2011</year>
          <month>12</month>
          <volume>12</volume>
          <issue>4</issue>
          <fpage>230</fpage>
          <lpage>50</lpage>
          <pub-id pub-id-type="doi">10.1016/j.pmn.2011.10.002</pub-id>
          <pub-id pub-id-type="medline">22117755</pub-id>
          <pub-id pub-id-type="pii">S1524-9042(11)00188-3</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref15">
        <label>15</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Kasaeyan Naeini</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Jiang</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Syrjälä</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Calderon</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Mieronkoski</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Zheng</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Dutt</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Liljeberg</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Salanterä</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Nelson</surname>
              <given-names>AM</given-names>
            </name>
            <name name-style="western">
              <surname>Rahmani</surname>
              <given-names>AM</given-names>
            </name>
          </person-group>
          <article-title>Prospective Study Evaluating a Pain Assessment Tool in a Postoperative Environment: Protocol for Algorithm Testing and Enhancement</article-title>
          <source>JMIR Res Protoc</source>
          <year>2020</year>
          <month>07</month>
          <day>01</day>
          <volume>9</volume>
          <issue>7</issue>
          <fpage>e17783</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://www.researchprotocols.org/2020/7/e17783/"/>
          </comment>
          <pub-id pub-id-type="doi">10.2196/17783</pub-id>
          <pub-id pub-id-type="medline">32609091</pub-id>
          <pub-id pub-id-type="pii">v9i7e17783</pub-id>
          <pub-id pub-id-type="pmcid">PMC7367536</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref16">
        <label>16</label>
        <nlm-citation citation-type="web">
          <article-title>Galvanic Skin Response - The Complete Pocket Guide</article-title>
          <source>IMotions</source>
          <year>2017</year>
          <access-date>2021-04-11</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://imotions.com/guides/eda-gsr/">https://imotions.com/guides/eda-gsr/</ext-link>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref17">
        <label>17</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Rostami</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Pandey</surname>
              <given-names>V</given-names>
            </name>
            <name name-style="western">
              <surname>Nag</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Wang</surname>
              <given-names>V</given-names>
            </name>
            <name name-style="western">
              <surname>Jain</surname>
              <given-names>R</given-names>
            </name>
          </person-group>
          <article-title>Personal Food Model</article-title>
          <year>2020</year>
          <conf-name>28th ACM International Conference on Multimedia</conf-name>
          <conf-date>October 2020</conf-date>
          <conf-loc>Seattle, WA</conf-loc>
          <publisher-loc>USA</publisher-loc>
          <publisher-name>Association for Computing Machinery</publisher-name>
          <pub-id pub-id-type="doi">10.1145/3394171.3414691</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref18">
        <label>18</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Eriksson</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Storm</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Fremming</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Schollin</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>Skin conductance compared to a combined behavioural and physiological pain measure in newborn infants</article-title>
          <source>Acta Paediatr</source>
          <year>2008</year>
          <month>01</month>
          <volume>97</volume>
          <issue>1</issue>
          <fpage>27</fpage>
          <lpage>30</lpage>
          <pub-id pub-id-type="doi">10.1111/j.1651-2227.2007.00586.x</pub-id>
          <pub-id pub-id-type="medline">18052991</pub-id>
          <pub-id pub-id-type="pii">APA586</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref19">
        <label>19</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Munsters</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Wallström</surname>
              <given-names>L</given-names>
            </name>
            <name name-style="western">
              <surname>Agren</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Norsted</surname>
              <given-names>T</given-names>
            </name>
            <name name-style="western">
              <surname>Sindelar</surname>
              <given-names>R</given-names>
            </name>
          </person-group>
          <article-title>Skin conductance measurements as pain assessment in newborn infants born at 22-27 weeks gestational age at different postnatal age</article-title>
          <source>Early Hum Dev</source>
          <year>2012</year>
          <month>01</month>
          <volume>88</volume>
          <issue>1</issue>
          <fpage>21</fpage>
          <lpage>6</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://linkinghub.elsevier.com/retrieve/pii/S0378-3782(11)00213-1"/>
          </comment>
          <pub-id pub-id-type="doi">10.1016/j.earlhumdev.2011.06.010</pub-id>
          <pub-id pub-id-type="medline">21764228</pub-id>
          <pub-id pub-id-type="pii">S0378-3782(11)00213-1</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref20">
        <label>20</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Shankar</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Manivannan</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Fernandez</surname>
              <given-names>P</given-names>
            </name>
          </person-group>
          <article-title>GSR analysis of hypnotic analgesia</article-title>
          <source>International Journal of Systemics, Cybernetics and Informatics</source>
          <year>2008</year>
          <fpage>35</fpage>
          <lpage>38</lpage>
          <pub-id pub-id-type="doi">10.1016/b978-012370880-9.00212-7</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref21">
        <label>21</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Susam</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Akcakaya</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Nezamfar</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Diaz</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Xu</surname>
              <given-names>X</given-names>
            </name>
            <name name-style="western">
              <surname>de Sa</surname>
              <given-names>VR</given-names>
            </name>
            <name name-style="western">
              <surname>Craig</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Huang</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Goodwin</surname>
              <given-names>M</given-names>
            </name>
          </person-group>
          <article-title>Automated Pain Assessment using Electrodermal Activity Data and Machine Learning</article-title>
          <source>Annu Int Conf IEEE Eng Med Biol Soc</source>
          <year>2018</year>
          <month>07</month>
          <volume>2018</volume>
          <fpage>372</fpage>
          <lpage>375</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://europepmc.org/abstract/MED/30440413"/>
          </comment>
          <pub-id pub-id-type="doi">10.1109/EMBC.2018.8512389</pub-id>
          <pub-id pub-id-type="medline">30440413</pub-id>
          <pub-id pub-id-type="pmcid">PMC6436808</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref22">
        <label>22</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Zargari</surname>
              <given-names>AHA</given-names>
            </name>
            <name name-style="western">
              <surname>Dautta</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Ashrafiamiri</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Seo</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Tseng</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Kurdahi</surname>
              <given-names>F</given-names>
            </name>
          </person-group>
          <article-title>NEWERTRACK: ML-Based Accurate Tracking of In-Mouth Nutrient Sensors Position Using Spectrum-Wide Information</article-title>
          <source>IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst</source>
          <year>2020</year>
          <month>11</month>
          <volume>39</volume>
          <issue>11</issue>
          <fpage>3833</fpage>
          <lpage>3841</lpage>
          <pub-id pub-id-type="doi">10.1109/tcad.2020.3013074</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref23">
        <label>23</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Mehrabadi</surname>
              <given-names>MA</given-names>
            </name>
            <name name-style="western">
              <surname>Aqajari</surname>
              <given-names>SAH</given-names>
            </name>
            <name name-style="western">
              <surname>Azimi</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>Downs</surname>
              <given-names>CA</given-names>
            </name>
            <name name-style="western">
              <surname>Dutt</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Rahmani</surname>
              <given-names>AM</given-names>
            </name>
          </person-group>
          <article-title>Detection of COVID-19 Using Heart Rate and Blood Pressure: Lessons Learned from Patients with ARDS</article-title>
          <source>arXiv Prepr arXiv201110470 2020</source>
          <year>2020</year>
          <fpage>1</fpage>
          <lpage>7</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://arxiv.org/pdf/2011.10470.pdf"/>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref24">
        <label>24</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Ashrafiamiri</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Pudukotai</surname>
              <given-names>DS</given-names>
            </name>
            <name name-style="western">
              <surname>Afandizadeh</surname>
              <given-names>ZA</given-names>
            </name>
            <name name-style="western">
              <surname>Seo</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Kurdahi</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>Homayoun</surname>
              <given-names>H</given-names>
            </name>
          </person-group>
          <article-title>R2AD: Randomization and reconstructor-based adversarial defense for deep neural networks</article-title>
          <year>2020</year>
          <conf-name>MLCAD 2020: 2020 ACM/IEEE Workshop on Machine Learning for CAD</conf-name>
          <conf-date>November 2020</conf-date>
          <conf-loc>Virtual</conf-loc>
          <pub-id pub-id-type="doi">10.1145/3380446.3430628</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref25">
        <label>25</label>
        <nlm-citation citation-type="web">
          <source>HealthmateForever Therapeutic Solutions</source>
          <access-date>2021-04-11</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://www.healthmateforever.com/products/fda-cleared-otc-pain-relief-yk15ab-tens-units">https://www.healthmateforever.com/products/fda-cleared-otc-pain-relief-yk15ab-tens-units</ext-link>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref26">
        <label>26</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Thong</surname>
              <given-names>ISK</given-names>
            </name>
            <name name-style="western">
              <surname>Jensen</surname>
              <given-names>MP</given-names>
            </name>
            <name name-style="western">
              <surname>Miró</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Tan</surname>
              <given-names>G</given-names>
            </name>
          </person-group>
          <article-title>The validity of pain intensity measures: what do the NRS, VAS, VRS, and FPS-R measure?</article-title>
          <source>Scand J Pain</source>
          <year>2018</year>
          <month>01</month>
          <day>26</day>
          <volume>18</volume>
          <issue>1</issue>
          <fpage>99</fpage>
          <lpage>107</lpage>
          <pub-id pub-id-type="doi">10.1515/sjpain-2018-0012</pub-id>
          <pub-id pub-id-type="medline">29794282</pub-id>
          <pub-id pub-id-type="pii">sjpain-2018-0012</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref27">
        <label>27</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Johnson</surname>
              <given-names>C</given-names>
            </name>
          </person-group>
          <article-title>Measuring Pain. Visual Analog Scale Versus Numeric Pain Scale: What is the Difference?</article-title>
          <source>Journal of Chiropractic Medicine</source>
          <year>2005</year>
          <month>12</month>
          <volume>4</volume>
          <issue>1</issue>
          <fpage>43</fpage>
          <lpage>44</lpage>
          <pub-id pub-id-type="doi">10.1016/s0899-3467(07)60112-8</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref28">
        <label>28</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Aqajari</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Naeini</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Mehrabadi</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Labbaf</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Rahmani</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Dutt</surname>
              <given-names>N</given-names>
            </name>
          </person-group>
          <article-title>GSR Analysis for Stress: Development and Validation of an Open Source Tool for Noisy Naturalistic GSR Data</article-title>
          <source>arXiv:2005.01834</source>
          <year>2020</year>
          <fpage>1</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://arxiv.org/abs/2005.01834"/>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref29">
        <label>29</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Greco</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Valenza</surname>
              <given-names>G</given-names>
            </name>
            <name name-style="western">
              <surname>Lanata</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Scilingo</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Citi</surname>
              <given-names>L</given-names>
            </name>
          </person-group>
          <article-title>cvxEDA: a Convex Optimization Approach to Electrodermal Activity Processing</article-title>
          <source>IEEE Trans. Biomed. Eng</source>
          <year>2016</year>
          <fpage>1</fpage>
          <lpage>1</lpage>
          <pub-id pub-id-type="doi">10.1109/tbme.2015.2474131</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref30">
        <label>30</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Breiman</surname>
              <given-names>L</given-names>
            </name>
          </person-group>
          <article-title>Random forests</article-title>
          <source>Machine Learning</source>
          <year>2001</year>
          <volume>45</volume>
          <fpage>5</fpage>
          <lpage>32</lpage>
          <pub-id pub-id-type="doi">10.1023/A:1010933404324</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref31">
        <label>31</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Altman</surname>
              <given-names>NS</given-names>
            </name>
          </person-group>
          <article-title>An Introduction to Kernel and Nearest-Neighbor Nonparametric Regression</article-title>
          <source>The American Statistician</source>
          <year>1992</year>
          <month>08</month>
          <volume>46</volume>
          <issue>3</issue>
          <fpage>175</fpage>
          <pub-id pub-id-type="doi">10.2307/2685209</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref32">
        <label>32</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Pedregosa</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>Varoquaux</surname>
              <given-names>G</given-names>
            </name>
            <name name-style="western">
              <surname>Gramfort</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Michel</surname>
              <given-names>V</given-names>
            </name>
            <name name-style="western">
              <surname>Thirion</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Grisel</surname>
              <given-names>O</given-names>
            </name>
            <name name-style="western">
              <surname>Blondel</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Prettenhofer</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Weiss</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Dubourg</surname>
              <given-names>V</given-names>
            </name>
            <name name-style="western">
              <surname>Vanderplas</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Passos</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Cournapeau</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Brucher</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Perrot</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Duchesnay</surname>
              <given-names>É</given-names>
            </name>
          </person-group>
          <article-title>Scikit-learn: Machine learning in Python</article-title>
          <source>Journal of Machine Learning Research</source>
          <year>2011</year>
          <volume>12</volume>
          <fpage>2825</fpage>
          <lpage>2830</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://www.jmlr.org/papers/volume12/pedregosa11a/pedregosa11a.pdf"/>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref33">
        <label>33</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Kohavi</surname>
              <given-names>R</given-names>
            </name>
          </person-group>
          <article-title>A Study of Cross-Validation and Bootstrap for Accuracy Estimation and Model Selection</article-title>
          <year>1995</year>
          <conf-name>14th International Joint Conference on Artificial Intelligence</conf-name>
          <conf-date>August 1995</conf-date>
          <conf-loc>San Francisco, CA</conf-loc>
        </nlm-citation>
      </ref>
    </ref-list>
  </back>
</article>
