<?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">v8i9e17818</article-id>
      <article-id pub-id-type="pmid">32990638</article-id>
      <article-id pub-id-type="doi">10.2196/17818</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>Using Machine Learning and Smartphone and Smartwatch Data to Detect Emotional States and Transitions: Exploratory Study</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="editor">
          <name>
            <surname>Eysenbach</surname>
            <given-names>Gunther</given-names>
          </name>
        </contrib>
      </contrib-group>
      <contrib-group>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Vaizman</surname>
            <given-names>Yonatan</given-names>
          </name>
        </contrib>
        <contrib contrib-type="reviewer">
          <name>
            <surname>Tedesco</surname>
            <given-names>Salvatore</given-names>
          </name>
        </contrib>
      </contrib-group>
      <contrib-group>
        <contrib id="contrib1" contrib-type="author" equal-contrib="yes">
          <name name-style="western">
            <surname>Sultana</surname>
            <given-names>Madeena</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <xref rid="aff2" ref-type="aff">2</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-9272-4326</ext-link>
        </contrib>
        <contrib id="contrib2" contrib-type="author" equal-contrib="yes">
          <name name-style="western">
            <surname>Al-Jefri</surname>
            <given-names>Majed</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <xref rid="aff3" ref-type="aff">3</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0002-2293-3632</ext-link>
        </contrib>
        <contrib id="contrib3" contrib-type="author" corresp="yes">
          <name name-style="western">
            <surname>Lee</surname>
            <given-names>Joon</given-names>
          </name>
          <degrees>PhD</degrees>
          <xref rid="aff1" ref-type="aff">1</xref>
          <address>
            <institution>Data Intelligence for Health Lab</institution>
            <institution>Cumming School of Medicine</institution>
            <institution>University of Calgary</institution>
            <addr-line>Teaching Research &#38; Wellness 5E17</addr-line>
            <addr-line>3280 Hospital Dr. NW</addr-line>
            <addr-line>Calgary, AB, T2N 4Z6</addr-line>
            <country>Canada</country>
            <phone>1 403 220 2968</phone>
            <email>joonwu.lee@ucalgary.ca</email>
          </address>
          <xref rid="aff2" ref-type="aff">2</xref>
          <xref rid="aff4" ref-type="aff">4</xref>
          <ext-link ext-link-type="orcid">https://orcid.org/0000-0001-8593-9321</ext-link>
        </contrib>
      </contrib-group>
      <aff id="aff1">
        <label>1</label>
        <institution>Data Intelligence for Health Lab</institution>
        <institution>Cumming School of Medicine</institution>
        <institution>University of Calgary</institution>
        <addr-line>Calgary, AB</addr-line>
        <country>Canada</country>
      </aff>
      <aff id="aff2">
        <label>2</label>
        <institution>Department of Community Health Sciences</institution>
        <institution>Cumming School of Medicine</institution>
        <institution>University of Calgary</institution>
        <addr-line>Calgary, AB</addr-line>
        <country>Canada</country>
      </aff>
      <aff id="aff3">
        <label>3</label>
        <institution>Department of Medicine</institution>
        <institution>Cumming School of Medicine</institution>
        <institution>University of Calgary</institution>
        <addr-line>Calgary, AB</addr-line>
        <country>Canada</country>
      </aff>
      <aff id="aff4">
        <label>4</label>
        <institution>Department of Cardiac Sciences</institution>
        <institution>Cumming School of Medicine</institution>
        <institution>University of Calgary</institution>
        <addr-line>Calgary, AB</addr-line>
        <country>Canada</country>
      </aff>
      <author-notes>
        <corresp>Corresponding Author: Joon Lee <email>joonwu.lee@ucalgary.ca</email></corresp>
      </author-notes>
      <pub-date pub-type="collection">
        <month>9</month>
        <year>2020</year>
      </pub-date>
      <pub-date pub-type="epub">
        <day>29</day>
        <month>9</month>
        <year>2020</year>
      </pub-date>
      <volume>8</volume>
      <issue>9</issue>
      <elocation-id>e17818</elocation-id>
      <history>
        <date date-type="received">
          <day>14</day>
          <month>1</month>
          <year>2020</year>
        </date>
        <date date-type="rev-request">
          <day>10</day>
          <month>3</month>
          <year>2020</year>
        </date>
        <date date-type="rev-recd">
          <day>9</day>
          <month>7</month>
          <year>2020</year>
        </date>
        <date date-type="accepted">
          <day>3</day>
          <month>8</month>
          <year>2020</year>
        </date>
      </history>
      <copyright-statement>©Madeena Sultana, Majed Al-Jefri, Joon Lee. Originally published in JMIR mHealth and uHealth (http://mhealth.jmir.org), 29.09.2020.</copyright-statement>
      <copyright-year>2020</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 http://mhealth.jmir.org/, as well as this copyright and license information must be included.</p>
      </license>
      <self-uri xlink:href="http://mhealth.jmir.org/2020/9/e17818/" xlink:type="simple"/>
      <abstract>
        <sec sec-type="background">
          <title>Background</title>
          <p>Emotional state in everyday life is an essential indicator of health and well-being. However, daily assessment of emotional states largely depends on active self-reports, which are often inconvenient and prone to incomplete information. Automated detection of emotional states and transitions on a daily basis could be an effective solution to this problem. However, the relationship between emotional transitions and everyday context remains to be unexplored.</p>
        </sec>
        <sec sec-type="objective">
          <title>Objective</title>
          <p>This study aims to explore the relationship between contextual information and emotional transitions and states to evaluate the feasibility of detecting emotional transitions and states from daily contextual information using machine learning (ML) techniques.</p>
        </sec>
        <sec sec-type="methods">
          <title>Methods</title>
          <p>This study was conducted on the data of 18 individuals from a publicly available data set called ExtraSensory. Contextual and sensor data were collected using smartphone and smartwatch sensors in a free-living condition, where the number of days for each person varied from 3 to 9. Sensors included an accelerometer, a gyroscope, a compass, location services, a microphone, a phone state indicator, light, temperature, and a barometer. The users self-reported approximately 49 discrete emotions at different intervals via a smartphone app throughout the data collection period. We mapped the 49 reported discrete emotions to the 3 dimensions of the pleasure, arousal, and dominance model and considered 6 emotional states: discordant, pleased, dissuaded, aroused, submissive, and dominant. We built general and personalized models for detecting emotional transitions and states every 5 min. The transition detection problem is a binary classification problem that detects whether a person’s emotional state has changed over time, whereas state detection is a multiclass classification problem. In both cases, a wide range of supervised ML algorithms were leveraged, in addition to data preprocessing, feature selection, and data imbalance handling techniques. Finally, an assessment was conducted to shed light on the association between everyday context and emotional states.</p>
        </sec>
        <sec sec-type="results">
          <title>Results</title>
          <p>This study obtained promising results for emotional state and transition detection. The best area under the receiver operating characteristic (AUROC) curve for emotional state detection reached 60.55% in the general models and an average of 96.33% across personalized models. Despite the highly imbalanced data, the best AUROC curve for emotional transition detection reached 90.5% in the general models and an average of 88.73% across personalized models. In general, feature analyses show that spatiotemporal context, phone state, and motion-related information are the most informative factors for emotional state and transition detection. Our assessment showed that lifestyle has an impact on the predictability of emotion.</p>
        </sec>
        <sec sec-type="conclusions">
          <title>Conclusions</title>
          <p>Our results demonstrate a strong association of daily context with emotional states and transitions as well as the feasibility of detecting emotional states and transitions using data from smartphone and smartwatch sensors.</p>
        </sec>
      </abstract>
      <kwd-group>
        <kwd>mHealth</kwd>
        <kwd>mental health</kwd>
        <kwd>emotion detection</kwd>
        <kwd>emotional transition detection</kwd>
        <kwd>spatiotemporal context</kwd>
        <kwd>supervised machine learning</kwd>
        <kwd>artificial intelligence</kwd>
        <kwd>mobile phone</kwd>
        <kwd>digital biomarkers</kwd>
        <kwd>digital phenotyping</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec sec-type="introduction">
      <title>Introduction</title>
      <p>The emotional states of individuals may change frequently over time. Research has demonstrated the potential of recording daily emotional states and moods in health and well-being, including the early diagnosis of mental illness and disorders [<xref ref-type="bibr" rid="ref1">1</xref>-<xref ref-type="bibr" rid="ref3">3</xref>]. However, the process of recording emotional states and moods largely depends on active self-reports less frequently than daily. However, with the unprecedented rise of smartphones and wearable devices as well as the advancement in built-in sensors within these devices, it is possible to passively collect multimodal data from people’s everyday lives at a much higher frequency. The self-reporting problem of personal health tracking can therefore be solved to a great extent by leveraging machine learning (ML) algorithms on the myriad of data collected by smartphones and wearables.</p>
      <p>Predicting and monitoring mental health illnesses and diseases such as depression, bipolar disorder, Alzheimer disease, and schizophrenia via smartphones and wearable sensors have been an active area of research over the last few years. Research has been conducted in the quest for gold standard digital biomarkers that can be collected through consumer-grade smartphones and wearable sensors (eg, accelerometer, audio, location, phone log, sound features, etc) to detect mental health disorders in the early stages [<xref ref-type="bibr" rid="ref4">4</xref>,<xref ref-type="bibr" rid="ref5">5</xref>]. It is evident that mobility patterns, location variations, and phone usage patterns captured by smartphones can aid in identifying patients with mental health illnesses and disorders [<xref ref-type="bibr" rid="ref1">1</xref>,<xref ref-type="bibr" rid="ref2">2</xref>,<xref ref-type="bibr" rid="ref6">6</xref>-<xref ref-type="bibr" rid="ref9">9</xref>]. Early detection of depressive symptoms by applying deep neural networks and ML techniques to self-reported contextual data through smartphones obtained promising results [<xref ref-type="bibr" rid="ref8">8</xref>]. However, the aforementioned apps were designed from disease and illness perspectives and did not consider the automated detection of regular emotional states and transitions in everyday life.</p>
      <p>The association between everyday mood, emotion, and well-being and sensed data via smartphones and wearables has been studied recently. For example, Helbich [<xref ref-type="bibr" rid="ref10">10</xref>] found an association of people’s mental well-being with the neighborhood they live in, the places they visit, and the environmental exposure they experience. In a similar study by Sandstrom et al [<xref ref-type="bibr" rid="ref11">11</xref>], subjects reported emotional pleasantness in a societal environment, whereas positive and negative arousal at work. A daily mood assessment tool was proposed by Ma et al [<xref ref-type="bibr" rid="ref12">12</xref>] that utilized mobile phone sensor data such as location, audio, text messages, accelerometer, and light to classify mood. However, this study considered limited contextual parameters, and the subjective variability as well as transitions of emotional states remained uninvestigated. The prediction of the Ecological Momentary Assessment scores from smartphone data such as text messages, screen time, app usage, accelerometer, and phone camera have been studied by Asselbergs et al [<xref ref-type="bibr" rid="ref13">13</xref>], who reported a promising but lower prediction accuracy than naive benchmark approaches. Studies have also shown an association between mobile sensor data (eg, phone usage, motion, conversation, mobility, screen time, and skin conductance) and the academic performance and mental health conditions of college students [<xref ref-type="bibr" rid="ref14">14</xref>,<xref ref-type="bibr" rid="ref15">15</xref>]. Budner et al [<xref ref-type="bibr" rid="ref16">16</xref>] classified 9 emotional states in 2 dimensions (pleasure and activation) of the circumplex model by applying a random forest on the smartwatch sensor data such as motion, heart rate, light level, GPS coordinates, day of the week, humidity, air pressure, cloudiness, and windiness. In a similar study, an ML-based model was proposed by Zhang et al [<xref ref-type="bibr" rid="ref17">17</xref>] to recognize compound emotional states in pleasure and arousal dimensions from smartphone data (eg, microphone, accelerometer, GPS, text message, phone call, app usage). Promising results have been obtained in some recent works for daily mood and stress forecasting [<xref ref-type="bibr" rid="ref3">3</xref>,<xref ref-type="bibr" rid="ref18">18</xref>,<xref ref-type="bibr" rid="ref19">19</xref>], where deep neural networks were applied to physiological, personality traits, and sensed data acquired from a large-scale global population using smartphones and wearables.</p>
      <p>Despite encouraging results and progress, gaps in the literature include the lack of research on the association between emotional transition, sensed data, and contextual information; subjective variability in classification performance; and feasibility of frequent emotional state and transition detection. In addition, the majority of the previous studies are based on the circumplex model of affect [<xref ref-type="bibr" rid="ref20">20</xref>], which considers only the pleasure and arousal dimensions (also known as <italic>core affect</italic>). However, research has demonstrated that considering all the 3 dimensions can facilitate a better understanding and interpretation of persons’ emotional states [<xref ref-type="bibr" rid="ref21">21</xref>]. Therefore, the third dimension of emotional states—dominance—needs to be included in emotion recognition research.</p>
      <p>In this study, we aim to fill the aforementioned gaps. Our main objective is to study the feasibility of detecting emotional states and transitions every 5 min by applying ML to the data acquired from smartphone and smartwatch sensors. Our study includes all the 3 dimensions of emotional states (pleasure, arousal, and dominance [PAD]) as well as the variability of interpersonal data. The remainder of this paper is organized as follows. The Methods section describes the methodology followed in our study along with an overview of the data set description and preparation. The Results section shows the results obtained for emotion transition and detection tasks for both general and personalized models. The Discussion section presents the results with a deeper analysis of the features.</p>
    </sec>
    <sec sec-type="methods">
      <title>Methods</title>
      <sec>
        <title>The Data Set</title>
        <p>We obtained data from a publicly available data set called ExtraSensory [<xref ref-type="bibr" rid="ref22">22</xref>]. This data set was collected by the researchers of the University of California, San Diego (UCSD), in 2015 to 2016 for automated context labeling from signals captured via a wide range of smartphone and smartwatch sensors such as an accelerometer, a gyroscope, a magnetometer, a compass, location services, audio, phone state, light, air pressure, humidity, and temperature [<xref ref-type="bibr" rid="ref23">23</xref>]. It contains data from 60 subjects in free-living conditions, who were mainly students (both undergraduate and graduate) and research assistants at UCSD. The sensor data were collected every minute, and the contextual data were self-reported at different intervals by the users. This data set also contains optionally self-reported discrete emotions at different time intervals. There were a total of 49 different discrete emotions (eg, active, calm, happy, sleepy, etc) that were reported by the subjects and the interval varied from 1 min to several days. Researchers processed and cleaned the self-reported data by combining various sources of information such as location and other labels [<xref ref-type="bibr" rid="ref23">23</xref>] to make them reliable. Both the raw and cleaned versions of self-reported data are available. We used the cleaned version in this study.</p>
      </sec>
      <sec>
        <title>The Pleasure, Arousal, and Dominance Model</title>
        <p>The PAD model was developed by Mehrabian and Russell [<xref ref-type="bibr" rid="ref24">24</xref>] in 1974 to assess individuals’ psychological responses to environmental perception and experience. Persons’ emotional states can be perceived in 3 basic dimensions: pleasure, arousal, and dominance. Pleasure is the dimension of positive or negative feelings [<xref ref-type="bibr" rid="ref24">24</xref>]. Arousal represents states of mental responsiveness [<xref ref-type="bibr" rid="ref25">25</xref>]. Dominance is the perceptual cognitive dimension of the feeling influenced or controlled [<xref ref-type="bibr" rid="ref25">25</xref>]. Our study includes all the 3 dimensions of emotional states.</p>
      </sec>
      <sec>
        <title>Data Preparation</title>
        <sec>
          <title>Inclusion and Exclusion</title>
          <p>In this exploratory study, we aimed to apply ML in the 2 setups. First, we built personalized models using each person’s data to analyze the impact of variability across individuals. Second, we built generalized models using data from multiple individuals and validated them using data from other individuals who were left out during training. Although 37 subjects in the ExtraSensory [<xref ref-type="bibr" rid="ref22">22</xref>] data set reported their emotions at some points during data collection, only 18 of them had more than 1000 samples and less than 90% missing data. Therefore, we considered these 18 subjects in our study. We considered all signals collected from the smartphone and smartwatch sensors, timestamps, latitudes, and longitudes as features.</p>
        </sec>
        <sec>
          <title>Affective Ratings of Emotions</title>
          <p>In this study, we used the Affective Norms for English Words (ANEW) [<xref ref-type="bibr" rid="ref26">26</xref>] to map the 49 discrete emotions to the PAD model. ANEW was developed by the Center for the Study of Emotion and Attention to provide standardized materials to researchers studying emotion and attention. The latest ANEW database [<xref ref-type="bibr" rid="ref27">27</xref>] contains affective meanings of nearly 14,000 English lemmas rated by a larger cohort of 1827 participants with a wide range of diversities, including age, occupation, and educational differences. We used the latest database to map the 49 emotions to the 3 ratings of pleasure (<italic>p</italic>), arousal (<italic>a</italic>), and dominance (<italic>d</italic>). Therefore, each linguistic emotion label was converted into 3 continuous values on a scale of 1 to 9, where 1 and 9 indicate the lowest and highest intensity, respectively, in the corresponding PAD dimension. A list of the 49 emotions used in this study with their corresponding PAD values is included in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref> [<xref ref-type="bibr" rid="ref22">22</xref>,<xref ref-type="bibr" rid="ref23">23</xref>,<xref ref-type="bibr" rid="ref28">28</xref>]. We scaled the emotional ratings (<italic>R<sub>s</sub></italic>) in the range of –4 to +4 by subtracting 5. Then, we considered 6 states of emotions on the basis of the intensity (sign) in the 3 dimensions: discordant, pleased, dissuaded, aroused, submissive, and dominant. We calculated the prevailing emotional state at any point of time for a person by considering the absolute maximum value of (<italic>R<sub>s</sub></italic>) and its sign. The absolute maximum value indicates the dimension, whereas the sign represents the direction. Therefore, the emotional state at any point represents which of the 3 dimensions is prevailing and in what direction. For example, the emotional rate (<italic>R<sub>s</sub></italic>) of <italic>happy</italic> is 8.47, 6.05, and 7.21 <italic>for p, a,</italic> and <italic>d</italic>, respectively. The corresponding scaled values will be 3.47, 1.05, and 2.21, respectively. Here, the 3 values are positive, and the prevailing emotional state is (+<italic>p)</italic> pleased. Therefore, this emotional state will be assigned to the class <italic>pleased.</italic> Similarly, <italic>angry</italic> (<italic>p</italic>=2.53, <italic>a</italic>=6.2, and <italic>d=</italic>4.11) will be scaled to –2.47, 1.2, and –0.89, respectively, with a maximum absolute value of 2.47 and in the negative direction. Hence, <italic>angry</italic> will be assigned to the class <italic>discordant</italic>. There was 1 case (the emotion <italic>interested</italic>)<italic>, where p</italic> and <italic>a</italic> were equal<italic>.</italic> In this case, we had 2 dominant dimensions, and we chose the first positive value (in the order of <italic>PAD</italic>), <italic>p</italic>, to represent the dominant emotion. Although this is a limitation, there was only 1 emotion <italic>interested</italic> that had 2 equal values, and there were few cases with this emotion in the data set compared with the other 48 emotions. Although we considered 6 categories of emotional states, not all classes were present in every person’s data. Depending on the person, 1 or 2 emotional states were absent in the data set. <xref rid="figure1" ref-type="fig">Figure 1</xref> shows the different emotional states present in each person’s data.</p>
          <fig id="figure1" position="float">
            <label>Figure 1</label>
            <caption>
              <p>Proportion (%) of 6 emotional states per person. Pleased and dissuaded are the most frequent, whereas submissive and aroused are the least frequent emotional states among the 18 persons in our data set.</p>
            </caption>
            <graphic xlink:href="mhealth_v8i9e17818_fig1.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          </fig>
        </sec>
        <sec>
          <title>Feature Engineering</title>
          <p>Initially, we merged all features from sensors, location data, and self-reported contextual information. Sensor measurements were recorded for 20 seconds every minute, and the data collection period varied from 3 to 9 days for each person. The number of samples for each person varied from 1164 to 6263. The data set contains a mixture of binary and continuous variables. We also engineered 7 additional temporal and spatial features from timestamps and location data. Overall, the features can be categorized as follows.</p>
          <sec>
            <title>Motion</title>
            <p>We considered 138 features calculated from the raw measurements from 3 smartphone sensors (an accelerometer, a gyroscope, and a magnetometer) and 2 smartwatch sensors (an accelerometer and a compass). These are continuous variables.</p>
          </sec>
          <sec>
            <title>Audio</title>
            <p>We considered 28 naive features calculated as the averages and standard deviations of the 13 Mel Frequency Cepstral Coefficients from the approximately 20-second recording window and the overall power of the audio.</p>
          </sec>
          <sec>
            <title>Location</title>
            <p>We considered 17 location features measured from the relative locations and movement variability in every minute of persons. We also feature engineered 3 more location features: <italic>cl_latitude</italic>, <italic>cl_longitude</italic>, and <italic>geo_dist</italic>. We clustered the neighboring latitudes and longitudes using geohash [<xref ref-type="bibr" rid="ref29">29</xref>]. Geohash is a geocoding system invented by Niemeyer [<xref ref-type="bibr" rid="ref29">29</xref>] that enables the grouping of neighboring points in a rectangular cell defined by a precision value. We used a precision value of 8 to cluster the neighboring latitude and longitude within 38.2 m × 19.1 m. The rectangular box worked as a bounding box for all neighboring spatial points falling into this area. After geohashing, the geocodes were decoded back to clustered latitude (<italic>cl_latitude</italic>) and longitude (<italic>cl_longitude</italic>) values. We calculated the <italic>geo_dist</italic> feature as the Haversian distance traveled by the person since the previous time stamp.</p>
          </sec>
          <sec>
            <title>Phone State</title>
            <p>We considered 28 binary features that indicate the sensed state of the phone, such as app states, battery plugged, battery states, ringer mode, on the phone, Wi-Fi status, screen brightness, and battery level.</p>
          </sec>
          <sec>
            <title>Environmental</title>
            <p>The ExtraSensory data set also contains 6 environmental variables such as light, pressure, humidity, and temperature. All of these continuous variables were included in our primary feature list. However, there were many missing values for these features because not all phones had all the sensors.</p>
          </sec>
          <sec>
            <title>Temporal</title>
            <p>We engineered 5 variables from the recorded time stamps to explore the temporal pattern of emotional states and transitions: <italic>minute of the hour</italic>, <italic>minute of the day</italic>, <italic>hour of the day</italic>, <italic>day of week</italic>, and <italic>time difference in minutes</italic>. As the data set was very sparse, we calculated the <italic>time difference in minutes</italic> variable to measure how many minutes elapsed since the last record. The remaining 4 variables were categorical variables.</p>
          </sec>
          <sec>
            <title>Contextual</title>
            <p>We also considered 51 binary contextual labels such as indoor, outdoor, eating, and in a car, which were self-reported by the subjects at various intervals. We assumed that this self-reported information was correct in all cases to focus on automatically recognizing the dominant emotion without dealing with noisy estimates of the context. Although the latest ExtraSensory app [<xref ref-type="bibr" rid="ref28">28</xref>] is capable of recognizing contextual information passively on the basis of raw sensor data, the data set used in this study did not include the output from this new feature.</p>
            <p>A complete list of features is included in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>.</p>
          </sec>
        </sec>
        <sec>
          <title>Data Resampling, Cleaning, and Imputation</title>
          <p>Our study aims to detect emotional transitions and states in small time intervals. Therefore, we resampled all data to a frequency of every 5 min. In the original data, the number of samples in 5-min intervals varied from 0 to 5. During resampling, we calculated the average of all continuous variables, the summation of all binary variables, and the maximum of all ordinal variables for all samples within the 5-min interval. This allowed us to have an evenly spaced sampling frequency over time and reduced missing data. All missing values were replaced by a large negative number to indicate missingness. Features were standardized by removing the mean and scaling to unit variance. This was done on the basis of the training sets.</p>
        </sec>
        <sec>
          <title>Ethics Approval</title>
          <p>As ExtraSensory is a public data set, research ethics approval was waived.</p>
        </sec>
      </sec>
      <sec>
        <title>Emotional Transition and State Detection</title>
        <sec>
          <title>Feature Handling</title>
          <p>For emotional transition detection, we considered the changes in features from the previous window. Therefore, the feature set <italic>T<sub>t,k</sub></italic> at any time <italic>t</italic> was calculated as follows:</p>
          <graphic xlink:href="mhealth_v8i9e17818_fig10.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          <p>In equation 1, the total number of features is n, <italic>f<sub>t,k</sub></italic> represents the value of the <italic>k</italic>th feature at the <italic>t</italic>th window, and <italic>f<sub>t</sub></italic><sub>−1,</sub><italic><sub>k</sub></italic> represents the value of the <italic>k</italic>th feature at the <italic>(t-1)</italic>th window. The intuition was to feed the ML models with the changes in information to find any pattern associated with changes in the captured data. The original form of the resampled features was used for emotional state detection.</p>
          <p>Next, we analyzed the features to select a smaller set of important features. We selected the k best features for each model by applying the SelectKBest feature selection function from the feature_selection package provided by sklearn, where the following values were experimented for k: 50, 70, 90, and 110. This feature selection process was applied independently for emotional transition and state detection and for general and personalized models. This resulted in a different number of features for each model. Additionally, columns with more than 30% missing data were removed. Location data were removed from the general models to make the models as generalizable as possible.</p>
        </sec>
        <sec>
          <title>Machine Learning Models</title>
          <p>We developed general models for all individuals as well as personalized models for each person to explore the impact of interpersonal variability on the performance of emotional transition and state detection.</p>
          <p>We used 5 supervised ML algorithms: logistic regression (LR), random forest (RF), XGBoost (XGB), CatBoost (CB), and multilayer perceptron. Emotional transition detection is a binary classification problem, where 0 and 1 denote no change and change in emotional state, respectively, over the last 5-min window. Owing to the sparsity of the data, the target variable was overly imbalanced. <xref rid="figure2" ref-type="fig">Figure 2</xref> shows the class imbalance of emotional state transitions of the 18 persons. Hence, we also applied 2 imbalance handling techniques that we explain in the <italic>Imbalance Handling</italic> section below.</p>
          <fig id="figure2" position="float">
            <label>Figure 2</label>
            <caption>
              <p>A stacked bar chart of the distribution of the 2 classes (transition and no transition) per person.</p>
            </caption>
            <graphic xlink:href="mhealth_v8i9e17818_fig2.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
          </fig>
          <p>Emotional state detection is a multiclass classification problem, where we intended to classify the prevailing emotional state of a person at a given time into one of the following 6 classes: 1, discordant; 2, pleased; 3, dissuaded; 4, aroused; 5, submissive; and 6, dominant. However, as shown in <xref rid="figure1" ref-type="fig">Figure 1</xref>, the emotional state classes were also imbalanced. We removed any class from a person’s data having less than or equal to 6 samples. As a result, the number of classes varied from 3 to 5 for each person.</p>
          <p>Hyperparameters for each model were determined using a stratified cross-validated grid search over a parameter grid. In the general models, we used a six-fold, leave-3-people-out cross-validation, where for each fold, the models were trained on 15 individuals’ data and tested on the remaining 3 data points. Hyperparameters were tuned by optimizing the <italic>F</italic><sub>1</sub> score. The tuned hyperparameters are listed in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>. For the personalized models, a five-fold, stratified cross-validation was used to fine-tune the hyperparameters and select the best-performing models. The total number of samples per person varied from 257 to 1268. We measured 7 performance metrics to evaluate the classification performance: accuracy, balanced accuracy, precision, recall, <italic>F</italic><sub>1</sub> score, specificity, and area under the receiver operating characteristic (AUROC) curve. For emotional state detection, the macro precision, recall, <italic>F</italic><sub>1</sub> score, specificity, and AUROC curve were measured to emphasize the detection performance for the minority classes.</p>
        </sec>
        <sec>
          <title>Imbalance Handling</title>
          <p>In this study, Synthetic Minority Over-sampling Technique (SMOTE) and Support Vector Machines Synthetic Minority Over-sampling Technique (SVMSMOTE) [<xref ref-type="bibr" rid="ref30">30</xref>] were applied to mitigate class imbalance. These are oversampling methods that create synthetic data of the minority classes to decrease the imbalance. All imbalance handling techniques were applied only on training data to avoid data leakage between training and test sets.</p>
        </sec>
        <sec>
          <title>Feature Analysis</title>
          <p>We analyzed the importance of the 7 categories of features used in this study for both emotional transition and state detection. The detection performance of emotional transition and state varied for different persons, which we categorized as best, average, and worst performances. We used the output of the XGB classifier for the feature importance analysis to explore the best-performing features.</p>
        </sec>
      </sec>
      <sec>
        <title>Software</title>
        <p>This study was conducted in Python 3 with the following packages: Scikit-Learn (0.22), CB, XGB, and SHapley Additive exPlanation (SHAP). Python codes are publicly available on GitHub [<xref ref-type="bibr" rid="ref31">31</xref>].</p>
      </sec>
    </sec>
    <sec sec-type="results">
      <title>Results</title>
      <p>A summary of the data set containing the number of days and the percentage of missing data is presented in <xref ref-type="table" rid="table1">Table 1</xref>. <xref ref-type="table" rid="table1">Table 1</xref> shows that the average amount of missing values in the data set was approximately 63%, where the range varied from 38.66% to 88.8% for different persons.</p>
      <table-wrap position="float" id="table1">
        <label>Table 1</label>
        <caption>
          <p>Summary of the 18 persons’ (P1-P18) data used in this study.</p>
        </caption>
        <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
          <col width="150"/>
          <col width="180"/>
          <col width="400"/>
          <col width="270"/>
          <thead>
            <tr valign="top">
              <td>Person</td>
              <td>Number of days</td>
              <td colspan="2">Data (5-min window)</td>
            </tr>
            <tr valign="bottom">
              <td>
                <break/>
              </td>
              <td>
                <break/>
              </td>
              <td>Windows with complete data, n</td>
              <td>Missing data<sup>a</sup> (%)</td>
            </tr>
          </thead>
          <tbody>
            <tr valign="top">
              <td>P1</td>
              <td>3</td>
              <td>268</td>
              <td>68.9</td>
            </tr>
            <tr valign="top">
              <td>P2</td>
              <td>8</td>
              <td>1275</td>
              <td>44.62</td>
            </tr>
            <tr valign="top">
              <td>P3</td>
              <td>7</td>
              <td>539</td>
              <td>73.21</td>
            </tr>
            <tr valign="top">
              <td>P4</td>
              <td>8</td>
              <td>1245</td>
              <td>45.92</td>
            </tr>
            <tr valign="top">
              <td>P5</td>
              <td>8</td>
              <td>551</td>
              <td>76.04</td>
            </tr>
            <tr valign="top">
              <td>P6</td>
              <td>8</td>
              <td>623</td>
              <td>72.92</td>
            </tr>
            <tr valign="top">
              <td>P7</td>
              <td>8</td>
              <td>1268</td>
              <td>44.92</td>
            </tr>
            <tr valign="top">
              <td>P8</td>
              <td>8</td>
              <td>257</td>
              <td>88.80</td>
            </tr>
            <tr valign="top">
              <td>P9</td>
              <td>7</td>
              <td>317</td>
              <td>84.23</td>
            </tr>
            <tr valign="top">
              <td>P10</td>
              <td>8</td>
              <td>862</td>
              <td>62.54</td>
            </tr>
            <tr valign="top">
              <td>P11</td>
              <td>8</td>
              <td>911</td>
              <td>60.42</td>
            </tr>
            <tr valign="top">
              <td>P12</td>
              <td>8</td>
              <td>752</td>
              <td>67.32</td>
            </tr>
            <tr valign="top">
              <td>P13</td>
              <td>9</td>
              <td>755</td>
              <td>70.83</td>
            </tr>
            <tr valign="top">
              <td>P14</td>
              <td>7</td>
              <td>1164</td>
              <td>42.21</td>
            </tr>
            <tr valign="top">
              <td>P15</td>
              <td>8</td>
              <td>692</td>
              <td>69.92</td>
            </tr>
            <tr valign="top">
              <td>P16</td>
              <td>7</td>
              <td>868</td>
              <td>56.89</td>
            </tr>
            <tr valign="top">
              <td>P17</td>
              <td>3</td>
              <td>529</td>
              <td>38.7</td>
            </tr>
            <tr valign="top">
              <td>P18</td>
              <td>7</td>
              <td>707</td>
              <td>64.88</td>
            </tr>
            <tr valign="top">
              <td>Average (SD)</td>
              <td>7.22 (1.63)</td>
              <td>754.61 (328.06)</td>
              <td>62.96 (14.71)</td>
            </tr>
          </tbody>
        </table>
        <table-wrap-foot>
          <fn id="table1fn1">
            <p><sup>a</sup>Missing value is the percentage of missing windows (time slots).</p>
          </fn>
        </table-wrap-foot>
      </table-wrap>
      <sec>
        <title>Emotional Transition or State Detection Results</title>
        <p>In terms of general models for emotional transition detection, the best-performing classifiers were LR, XGB, and CB. <xref ref-type="table" rid="table2">Table 2</xref> shows the results of these classifiers. As shown in <xref ref-type="table" rid="table2">Table 2</xref>, the best average AUROC curve of 90.5% was obtained by LR, followed by XGB and CB with 89.72% and 89.24%, respectively. The table also shows that using imbalance handling improved average recall only but did not improve the results in general. In general, SVMSMOTE produced better results in terms of imbalance handling than SMOTE for most models. Complete results including the results using SMOTE are shown in the <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>.</p>
        <table-wrap position="float" id="table2">
          <label>Table 2</label>
          <caption>
            <p>Results of the general models for emotional transition detection on the basis of a six-fold, leave-3-people-out cross-validation.</p>
          </caption>
          <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
            <col width="260"/>
            <col width="110"/>
            <col width="120"/>
            <col width="130"/>
            <col width="120"/>
            <col width="130"/>
            <col width="130"/>
            <thead>
              <tr valign="top">
                <td>Characteristics</td>
                <td colspan="3">Machine learning models<sup>a,b</sup> (without imbalance handling)</td>
                <td colspan="3">Imbalance handling using Support Vector Machines Synthetic Minority Over-sampling Technique</td>
              </tr>
              <tr valign="bottom">
                <td>
                  <break/>
                </td>
                <td>LR<sup>c</sup></td>
                <td>XGB<sup>d</sup></td>
                <td>CB<sup>e</sup></td>
                <td>LR</td>
                <td>XGB</td>
                <td>CB</td>
              </tr>
            </thead>
            <tbody>
              <tr valign="top">
                <td>Accuracy, % (SD)</td>
                <td>
                  <italic>94.77 (1.64)</italic>
                </td>
                <td>94.50 (1.54)</td>
                <td>94.60 (1.58)</td>
                <td>91.16 (1.24)</td>
                <td>5.33 (1.46)</td>
                <td>41.31 (33.75)</td>
              </tr>
              <tr valign="top">
                <td>Balanced accuracy, % (SD)</td>
                <td>60.59 (4.26)</td>
                <td>
                  <italic>66.92 (5.41)</italic>
                </td>
                <td>65.02 (5.47)</td>
                <td>80.76 (4.68)</td>
                <td>50.09 (0.18)</td>
                <td>60.56 (10.45)</td>
              </tr>
              <tr valign="top">
                <td>Precision (macro), % (SD)</td>
                <td>50.08 (10.55)</td>
                <td>
                  <italic>51.77 (16.98)</italic>
                </td>
                <td>51.01 (12.13)</td>
                <td>32.59 (5.47)</td>
                <td>5.17 (1.58)</td>
                <td>9.37 (4.73)</td>
              </tr>
              <tr valign="top">
                <td>Recall (macro), % (SD)</td>
                <td>22.32 (8.49)</td>
                <td>36.03 (11.70)</td>
                <td>31.98 (12.32)</td>
                <td>69.05 (9.46)</td>
                <td>
                  <italic>100.00 (0.00)</italic>
                </td>
                <td>82.27 (20.45)</td>
              </tr>
              <tr valign="top">
                <td>Specificity (macro), % (SD)</td>
                <td>
                  <italic>98.85 (0.44)</italic>
                </td>
                <td>97.81 (1.29)</td>
                <td>98.05 (1.53)</td>
                <td>92.48 (0.99)</td>
                <td>0.17 (0.36)</td>
                <td>38.84 (36.35)</td>
              </tr>
              <tr valign="top">
                <td>AUROC<sup>f</sup> (macro), % (SD)</td>
                <td>
                  <italic>90.50 (3.01)</italic>
                </td>
                <td>89.72 (2.51)</td>
                <td>89.24 (2.51)</td>
                <td>90.26 (3.20)</td>
                <td>60.49 (14.11)</td>
                <td>74.77 (9.75)</td>
              </tr>
              <tr valign="top">
                <td><italic>F</italic><sub>1</sub> (macro), % (SD)</td>
                <td>29.89 (9.51)</td>
                <td>38.85 (7.83)</td>
                <td>36.46 (6.72)</td>
                <td>
                  <italic>43.63 (5.05)</italic>
                </td>
                <td>9.80 (2.83)</td>
                <td>15.78 (6.53)</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn id="table2fn1">
              <p><sup>a</sup>Average (SD) across six-fold.</p>
            </fn>
            <fn id="table2fn2">
              <p><sup>b</sup>The highest value of each metric is italicized.</p>
            </fn>
            <fn id="table2fn3">
              <p><sup>c</sup>LR: logistic regression.</p>
            </fn>
            <fn id="table2fn4">
              <p><sup>d</sup>XGB: XGBoost.</p>
            </fn>
            <fn id="table2fn5">
              <p><sup>e</sup>CB: CatBoost.</p>
            </fn>
            <fn id="table2fn6">
              <p><sup>f</sup>AUROC: area under the receiver operating characteristic.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <p><xref ref-type="table" rid="table3">Table 3</xref> reports the performance measures for the general models for emotional state detection. As shown in <xref ref-type="table" rid="table3">Table 3</xref>, the best results were obtained from LR, CB, and RF. In particular, LR achieved the best average AUROC curve of 60.23%. Adding imbalance handling slightly improved some of the metrics such as specificity and balanced accuracy. The full results from all models and imbalance handling techniques can be found in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>.</p>
        <table-wrap position="float" id="table3">
          <label>Table 3</label>
          <caption>
            <p>Results of the general models for emotional state detection on the basis of a six-fold, leave-3-people-out cross-validation.</p>
          </caption>
          <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
            <col width="260"/>
            <col width="110"/>
            <col width="120"/>
            <col width="130"/>
            <col width="120"/>
            <col width="130"/>
            <col width="130"/>
            <thead>
              <tr valign="top">
                <td>Characteristics</td>
                <td colspan="3">Machine learning models<sup>a,b</sup> (without imbalance handling)</td>
                <td colspan="3">Imbalance handling using Support Vector Machines Synthetic Minority Over-sampling Technique</td>
              </tr>
              <tr valign="bottom">
                <td>
                  <break/>
                </td>
                <td>LR<sup>c</sup></td>
                <td>CB<sup>d</sup></td>
                <td>RF<sup>e</sup></td>
                <td>LR</td>
                <td>CB</td>
                <td>RF</td>
              </tr>
            </thead>
            <tbody>
              <tr valign="top">
                <td>Accuracy, % (SD)</td>
                <td>40.60 (9.50)</td>
                <td>
                  <italic>44.10 (13.93)</italic>
                </td>
                <td>44.04 (14.42)</td>
                <td>32.61 (2.65)</td>
                <td>39.52 (13.24)</td>
                <td>38.99 (8.71)</td>
              </tr>
              <tr valign="top">
                <td>Balanced accuracy, % (SD)</td>
                <td>22.83 (2.64)</td>
                <td>24.32 (3.23)</td>
                <td>21.84 (2.03)</td>
                <td>
                  <italic>30.66 (8.82)</italic>
                </td>
                <td>23.32 (2.91)</td>
                <td>23.27 (2.43)</td>
              </tr>
              <tr valign="top">
                <td>Precision (macro), % (SD)</td>
                <td>
                  <italic>34.25 (5.26)</italic>
                </td>
                <td>29.52 (11.39)</td>
                <td>20.36 (7.50)</td>
                <td>26.48 (2.32)</td>
                <td>27.18 (10.23)</td>
                <td>25.33 (2.20)</td>
              </tr>
              <tr valign="top">
                <td>Recall (macro), % (SD)</td>
                <td>
                  <italic>38.86 (6.68)</italic>
                </td>
                <td>33.29 (8.57)</td>
                <td>29.40 (3.87)</td>
                <td>28.27 (7.76)</td>
                <td>27.81 (5.77)</td>
                <td>25.94 (2.08)</td>
              </tr>
              <tr valign="top">
                <td>Specificity (macro), % (SD)</td>
                <td>63.37 (12.40)</td>
                <td>72.40 (3.62)</td>
                <td>71.23 (4.73)</td>
                <td>
                  <italic>82.93 (0.76)</italic>
                </td>
                <td>75.36 (4.66)</td>
                <td>76.93 (2.63)</td>
              </tr>
              <tr valign="top">
                <td>AUROC<sup>f</sup> (macro), % (SD)</td>
                <td>60.23 (8.15)</td>
                <td>58.58 (6.97)</td>
                <td>55.21 (4.31)</td>
                <td>
                  <italic>60.55 (3.41)</italic>
                </td>
                <td>56.83 (6.14)</td>
                <td>55.43 (4.37)</td>
              </tr>
              <tr valign="top">
                <td><italic>F</italic><sub>1</sub> (macro), % (SD)</td>
                <td>
                  <italic>30.60 (5.83)</italic>
                </td>
                <td>25.45 (10.72)</td>
                <td>19.20 (5.19)</td>
                <td>23.04 (2.82)</td>
                <td>21.20 (6.95)</td>
                <td>21.81 (3.24)</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn id="table3fn1">
              <p><sup>a</sup>Average (SD) across six-fold (average value for each metric).</p>
            </fn>
            <fn id="table3fn2">
              <p><sup>b</sup>The highest value of each metric is italicized.</p>
            </fn>
            <fn id="table3fn3">
              <p><sup>c</sup>LR: logistic regression.</p>
            </fn>
            <fn id="table3fn4">
              <p><sup>d</sup>CB: CatBoost.</p>
            </fn>
            <fn id="table3fn5">
              <p><sup>e</sup>RF: random forest.</p>
            </fn>
            <fn id="table3fn6">
              <p><sup>f</sup>AUROC: area under the receiver operating characteristic.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <p>For the personalized emotional transition detection models, all models performed quite well in general, and it was not possible to pinpoint 1 single best ML model and imbalance handling technique for all the 18 persons. <xref ref-type="table" rid="table4">Table 4</xref> reports the performance measures obtained from RF, XGB, and CB. The standard deviations of the measures indicate large variabilities across 18 persons. The best measures highlighted in <xref ref-type="table" rid="table4">Table 4</xref> demonstrate the variabilities of the measures across different ML models. As shown in <xref ref-type="table" rid="table4">Table 4</xref>, the best average AUROC curve of 88.01% was obtained by RF without imbalance handling, whereas SVMSMOTE helped improve recall in general (especially in XGB) and produced the best average AUROC curve of 88.7% with CB. The detailed results of all classifiers and imbalance handling techniques are listed in the <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>.</p>
        <table-wrap position="float" id="table4">
          <label>Table 4</label>
          <caption>
            <p>Results of the personalized models for emotional transition detection on the basis of the 5-fold, stratified cross-validation.</p>
          </caption>
          <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
            <col width="260"/>
            <col width="110"/>
            <col width="120"/>
            <col width="130"/>
            <col width="120"/>
            <col width="130"/>
            <col width="130"/>
            <thead>
              <tr valign="top">
                <td>Characteristics</td>
                <td colspan="3">Machine learning models<sup>a,b</sup> (without imbalance handling)</td>
                <td colspan="3">Imbalance handling using Support Vector Machines Synthetic Minority Over-sampling Technique</td>
              </tr>
              <tr valign="bottom">
                <td>
                  <break/>
                </td>
                <td>RF<sup>c</sup></td>
                <td>XGB<sup>d</sup></td>
                <td>CB<sup>e</sup></td>
                <td>RF</td>
                <td>XGB</td>
                <td>CB</td>
              </tr>
            </thead>
            <tbody>
              <tr valign="top">
                <td>Accuracy, % (SD)</td>
                <td>93.49 (4.73)</td>
                <td>
                  <italic>94.82 (2.55)</italic>
                </td>
                <td>94.29 (3.17)</td>
                <td>90.31 (7.17)</td>
                <td>89.54 (6.06)</td>
                <td>92.34 (5.01)</td>
              </tr>
              <tr valign="top">
                <td>Balanced accuracy, % (SD)</td>
                <td>66.88 (10.08)</td>
                <td>65.91 (7.93)</td>
                <td>66.89 (8.97)</td>
                <td>66.80 (5.93)</td>
                <td>
                  <italic>75.86 (8.52)</italic>
                </td>
                <td>70.28 (8.06)</td>
              </tr>
              <tr valign="top">
                <td>Precision (macro), % (SD)</td>
                <td>49.97 (21.23)</td>
                <td>
                  <italic>52.34 (17.22)</italic>
                </td>
                <td>48.67 (18.09)</td>
                <td>34.29 (17.13)</td>
                <td>35.69 (13.32)</td>
                <td>42.37 (14.18)</td>
              </tr>
              <tr valign="top">
                <td>Recall (macro), % (SD)</td>
                <td>37.12 (20.78)</td>
                <td>33.71 (15.69)</td>
                <td>36.45 (18.10)</td>
                <td>40.77 (13.49)</td>
                <td>
                  <italic>60.76 (16.37)</italic>
                </td>
                <td>45.82 (15.17)</td>
              </tr>
              <tr valign="top">
                <td>Specificity (macro), % (SD)</td>
                <td>96.65 (4.91)</td>
                <td>
                  <italic>98.12 (1.42)</italic>
                </td>
                <td>97.34 (2.33)</td>
                <td>92.82 (7.63)</td>
                <td>90.97 (6.03)</td>
                <td>94.75 (4.53)</td>
              </tr>
              <tr valign="top">
                <td>AUROC<sup>f</sup> (macro), % (SD)</td>
                <td>88.01 (5.67)</td>
                <td>87.84 (6.81)</td>
                <td>87.62 (7.04)</td>
                <td>85.08 (7.20)</td>
                <td>87.74 (6.63)</td>
                <td>
                  <italic>88.73 (6.24)</italic>
                </td>
              </tr>
              <tr valign="top">
                <td><italic>F</italic><sub>1</sub> (macro), % (SD)</td>
                <td>36.40 (17.87)</td>
                <td>38.00 (15.92)</td>
                <td>38.34 (17.07)</td>
                <td>32.92 (12.48)</td>
                <td>
                  <italic>41.85 (13.46)</italic>
                </td>
                <td>40.44 (13.88)</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn id="table4fn1">
              <p><sup>a</sup>Average (SD) across 18 persons.</p>
            </fn>
            <fn id="table4fn2">
              <p><sup>b</sup>The highest value of each metric is italicized.</p>
            </fn>
            <fn id="table4fn3">
              <p><sup>c</sup>RF: random forest.</p>
            </fn>
            <fn id="table4fn4">
              <p><sup>d</sup>XGB: XGBoost.</p>
            </fn>
            <fn id="table4fn5">
              <p><sup>e</sup>CB: CatBoost.</p>
            </fn>
            <fn id="table4fn6">
              <p><sup>f</sup>AUROC: area under the receiver operating characteristic.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
        <p>Compared with the performance of the general models for the emotional state detection task, the performance of the personalized models was substantially better. <xref ref-type="table" rid="table5">Table 5</xref> reports the performance measures obtained from CB, XGB, and RF. As shown in <xref ref-type="table" rid="table5">Table 5</xref>, the best average AUROC curve of 96.33% was obtained by CB followed by XGB and then RF. Applying imbalance handling techniques slightly improved the balanced accuracy, recall, and specificity. While all classes were maintained in the general models, the number of classes varied between 4 and 5 across the personalized models. Complete results including those from SMOTE are shown in the <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>.</p>
        <table-wrap position="float" id="table5">
          <label>Table 5</label>
          <caption>
            <p>Results of the personalized models for emotional state detection on the basis of a five-fold, stratified cross-validation.</p>
          </caption>
          <table width="1000" cellpadding="5" cellspacing="0" border="1" rules="groups" frame="hsides">
            <col width="260"/>
            <col width="110"/>
            <col width="120"/>
            <col width="130"/>
            <col width="120"/>
            <col width="130"/>
            <col width="130"/>
            <thead>
              <tr valign="top">
                <td>Characteristics</td>
                <td colspan="3">Machine learning models<sup>a,b</sup> (without imbalance handling)</td>
                <td colspan="3">Imbalance handling using Support Vector Machines Synthetic Minority Over-sampling Technique</td>
              </tr>
              <tr valign="bottom">
                <td>
                  <break/>
                </td>
                <td>CB<sup>c</sup></td>
                <td>XGB<sup>d</sup></td>
                <td>RF<sup>e</sup></td>
                <td>CB</td>
                <td>XGB</td>
                <td>RF</td>
              </tr>
            </thead>
            <tbody>
              <tr valign="top">
                <td>Accuracy, % (SD)</td>
                <td>
                  <italic>86.53 (8.08)</italic>
                </td>
                <td>82.73 (7.18)</td>
                <td>80.92 (10.69)</td>
                <td>85.27 (9.64)</td>
                <td>81.54 (8.90)</td>
                <td>78.21 (10.78)</td>
              </tr>
              <tr valign="top">
                <td>Balanced accuracy, % (SD)</td>
                <td>74.92 (13.55)</td>
                <td>69.51 (12.18)</td>
                <td>67.85 (14.10)</td>
                <td>
                  <italic>77.73 (13.34)</italic>
                </td>
                <td>74.50 (12.03)</td>
                <td>70.72 (13.92)</td>
              </tr>
              <tr valign="top">
                <td>Precision (macro), % (SD)</td>
                <td>
                  <italic>87.03 (9.37)</italic>
                </td>
                <td>82.49 (7.32)</td>
                <td>82.11 (8.67)</td>
                <td>84.44 (9.83)</td>
                <td>77.71 (11.09)</td>
                <td>75.94 (12.02)</td>
              </tr>
              <tr valign="top">
                <td>Recall (macro), % (SD)</td>
                <td>77.88 (11.35)</td>
                <td>74.54 (7.70)</td>
                <td>71.96 (10.87)</td>
                <td>
                  <italic>80.00 (10.74)</italic>
                </td>
                <td>77.23 (10.36)</td>
                <td>73.30 (11.91)</td>
              </tr>
              <tr valign="top">
                <td>Specificity (macro), % (SD)</td>
                <td>92.92 (4.80)</td>
                <td>90.48 (5.64)</td>
                <td>89.83 (6.58)</td>
                <td>
                  <italic>93.15 (4.84)</italic>
                </td>
                <td>91.96 (4.71)</td>
                <td>90.19 (5.67)</td>
              </tr>
              <tr valign="top">
                <td>AUROC<sup>f</sup> (macro), % (SD)</td>
                <td>
                  <italic>96.33 (3.26)</italic>
                </td>
                <td>94.81 (2.96)</td>
                <td>93.74 (5.62)</td>
                <td>96.26 (3.77)</td>
                <td>94.51 (3.39)</td>
                <td>92.93 (5.27)</td>
              </tr>
              <tr valign="top">
                <td><italic>F</italic><sub>1</sub> (macro), % (SD)</td>
                <td>
                  <italic>79.48 (11.38)</italic>
                </td>
                <td>74.87 (8.45)</td>
                <td>72.46 (12.07)</td>
                <td>79.47 (12.00)</td>
                <td>74.51 (12.05)</td>
                <td>70.73 (13.34)</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn id="table5fn1">
              <p><sup>a</sup>Average (SD) across 18 persons.</p>
            </fn>
            <fn id="table5fn2">
              <p><sup>b</sup>The highest value of each metric is italicized.</p>
            </fn>
            <fn id="table5fn3">
              <p><sup>c</sup>CB: CatBoost.</p>
            </fn>
            <fn id="table5fn4">
              <p><sup>d</sup>XGB: XGBoost.</p>
            </fn>
            <fn id="table5fn5">
              <p><sup>e</sup>RF: random forest.</p>
            </fn>
            <fn id="table5fn6">
              <p><sup>f</sup>AUROC: area under the receiver operating characteristic.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>
      </sec>
      <sec>
        <title>Feature Analysis Results</title>
        <p>Using the output of the XGB classifier for feature importance analysis, we explored the best-performing features. <xref rid="figure3" ref-type="fig">Figures 3</xref> and <xref rid="figure4" ref-type="fig">4</xref> show the 20 most important features of the general model using XGB and SHAP [<xref ref-type="bibr" rid="ref32">32</xref>] for emotional transition and state detection, respectively. The contextual information (prefix <italic>label</italic>) ranked higher among the 7 categories of features. Contextual information features appear among the top 4 features for both emotional transition and state detection. Other important features included motion, phone state, and temporal for both emotional transition and state detection.</p>
        <fig id="figure3" position="float">
          <label>Figure 3</label>
          <caption>
            <p>Feature importance for emotional transition detection of the general model obtained using XGBoost and shapley additive explanation. The figure represents the contribution of the corresponding feature to detect whether there is a transition.</p>
          </caption>
          <graphic xlink:href="mhealth_v8i9e17818_fig3.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
        </fig>
        <fig id="figure4" position="float">
          <label>Figure 4</label>
          <caption>
            <p>Feature importance for emotional state detection of the general model obtained using XGBoost and shapley additive explanation. The color-coded portions represent the contribution of the corresponding feature to detect different states (classes) of emotions: 1, discordant; 2, pleased; 3, dissuaded; 4, aroused; 5, submissive; and 6, dominant. SHAP: SHapley Additive exPlanation.</p>
          </caption>
          <graphic xlink:href="mhealth_v8i9e17818_fig4.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
        </fig>
        <p>We also explored the influential feature categories by considering the 3 most important features across all 18 persons. <xref rid="figure5" ref-type="fig">Figures 5</xref> and <xref rid="figure6" ref-type="fig">6</xref> demonstrate the importance of the 7 feature categories for emotional transition and state detection, respectively. This was done manually; each category is a bin of a set of features as described in the <italic>Feature Engineering</italic> section. Instead of the feature itself, we considered which bins the top-3 features belong to. This was done over folds for each person. For calculation, we considered a3 empty matrix, where 7 is for each category and 3 is for the top 3 ranks. Then we incremented the counter of the corresponding category and ranked the top 3 features of each fold for each person. For example, in <xref rid="figure3" ref-type="fig">Figure 3</xref> (although for a general model but for the sake of explanation), the top 3 features are <italic>label: SITTING</italic>, <italic>If_measurement:battery_level</italic>, and <italic>label: Source</italic>, where the first and third features belong to the contextual category and the second feature falls under the phone state category. This will increase the first and third rank counters of the contextual category and the second rank counter of the phone state category. This was done based on the XGB classifier and SHAP.</p>
        <fig id="figure5" position="float">
          <label>Figure 5</label>
          <caption>
            <p>Importance of feature categories for emotional transition detection. The color-coded portions of each category represent their contributions to the top 3 ranks of features of 18 persons.</p>
          </caption>
          <graphic xlink:href="mhealth_v8i9e17818_fig5.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
        </fig>
        <fig id="figure6" position="float">
          <label>Figure 6</label>
          <caption>
            <p>Importance of feature categories for emotional state detection. The color-coded portions of each category represent their contributions to the top 3 ranks of features of 18 persons.</p>
          </caption>
          <graphic xlink:href="mhealth_v8i9e17818_fig6.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
        </fig>
        <p><xref rid="figure5" ref-type="fig">Figure 5</xref> shows that the most important feature categories for emotional transition detection are contextual, motion, and audio signals, whereas the least important categories are temporal and environmental features. In contrast, as shown in <xref rid="figure6" ref-type="fig">Figure 6</xref>, the most important feature categories for emotional state detection are contextual and temporal, whereas the least important category is audio signals. Unlike emotional transition, emotional state was more influenced by environmental and location features. This also explains why the personalized emotional state detection models performed better than the general models where the location data were ignored. However, contextual data played the most important role in both emotional transition and state detection.</p>
      </sec>
    </sec>
    <sec sec-type="discussion">
      <title>Discussion</title>
      <p>The 4 major findings of this exploratory study are as follows:</p>
      <list list-type="bullet">
        <list-item>
          <p>Emotional transitions in small intervals are detectable from data captured via smartphones and smartwatches using ML techniques. We observed that the contextual data, sensed phone states, and motion-related signals are the most influential features for emotional transition detection.</p>
        </list-item>
        <list-item>
          <p>The prevailing emotional states and the direction in the 3 dimensions of the PAD model are detectable by applying ML algorithms to information captured by smartphones and smartwatches. The contextual and temporal data play important roles in the detection of emotional states in small time intervals.</p>
        </list-item>
        <list-item>
          <p>We observed a wide range of interpersonal variations in terms of the detectability of emotional transitions or states. In terms of the personalized models, no single ML model performed the best across all 18 persons.</p>
        </list-item>
        <list-item>
          <p>Personalized models can better detect emotional states than general models. We believe that a given individual’s data contributes most to detecting their own emotional state rather than using data from other individuals.</p>
        </list-item>
      </list>
      <p>This study shows the feasibility of detecting persons’ emotional states and transitions passively by training ML models on the daily data sensed via smartphones and smartwatches. In practice, these findings will help in reducing self-reports, enabling seamless tracking of daily emotions. For example, a person can be prompted to verify his or her emotional states only if the smartphone app senses a transition in the emotional state of the person. In addition, it can provide the capability of tracing the influential contextual variables that trigger the transition, which can be adjusted by the person for better self-management and well-being. Our investigation showed that self-reported contextual information played the most important role in both emotional transition and state detection. Although the contextual data are self-reported in this data set, latest research shows that contextual data can be labeled from sensed data by smartphone apps automatically without human intervention [<xref ref-type="bibr" rid="ref28">28</xref>].</p>
      <p>The emotional transition detection results obtained in this study are promising but not as good as the emotional state prediction performance. One reason for this could be the highly imbalanced classes, which can be resolved largely by acquiring data for a longer period of time (we had a noticeable improvement in the general models). Moreover, performance can be improved by combining contextual information with other dominant factors of emotions such as personality traits, social communication (eg, incoming-outgoing phone calls, duration, text messages, social media usage), and physiological signals (eg, heart rates, skin conductance) captured via smartphones and smartwatches.</p>
      <p>Unlike emotional transition detection, the performance of general models for emotional state detection was poor. Apart from being a harder task (six-class classification), we believe this is also due to the high variability across different individuals. Many state-of-the-art studies stressed the need for further research on interperson variations in affect, mood, and mental health [<xref ref-type="bibr" rid="ref11">11</xref>,<xref ref-type="bibr" rid="ref33">33</xref>]. One of the aims of our research was to address this identified gap by exploring subjective variabilities in emotional state and transition detection. Therefore, in addition to the general models, we built personalized models. In these personalized models, each model was trained and tested on each person’s data to explore the impact of interpersonal variability on the performance of emotional transition and state detection. The results of the personalized and generic models of this study bolster the need to consider subjective variability while building ML models for emotional state and change detection.</p>
      <p>We also observed that simpler models, such as LR, performed better for emotional transition detection and complex models, outperformed during emotional state detection. One reason for this could be the consideration of changes in features between 2 consecutive windows that made the data set sparser (containing many 0s) and smaller for emotional transition detection. Although the personalized models performed better than the general models, especially in the emotional state detection task, the general models can be used as baseline models, which can subsequently be personalized for each person.</p>
      <p>Although research has suggested the inclusion of dominance for a better understanding of emotional states [<xref ref-type="bibr" rid="ref21">21</xref>], it was ignored in the existing works on emotional state and mood recognitions. Our study showed that the prevailing emotional state and its direction in all the 3 dimensions can be detected using ML models on contextual information and data sensed via mobile phones and wearable devices. It can provide data-driven insights on which of the 3 dimensions of emotion prevailed for the person when, where, and in what direction, eventually leading the person toward effective lifestyle changes and better self-management.</p>
      <p>Our study shows that a large number of interpersonal variabilities yield superior detection of the emotional transition and state for some persons than others. We manually investigated the reason by considering 3 cases: best, worst, and average, to explore the association between everyday contexts and emotions of individuals. We selected persons 9, 2, and 14 as the best, worst, and average cases, respectively. We plotted the heatmaps of daily spatial contexts, activities, and emotional states over time for the worst, best, and average cases in <xref rid="figure7" ref-type="fig">Figures 7</xref>, <xref rid="figure8" ref-type="fig">8</xref>, and <xref rid="figure9" ref-type="fig">9</xref>, respectively. The 3 figures show that the majority of the data were collected when the persons were indoors or at home. For the worst case shown in <xref rid="figure7" ref-type="fig">Figure 7</xref>, the day-to-day activities and the emotional states of the person do not exhibit noticeable patterns over time. This might explain why the ML models were unable to capture a strong pattern of the contexts and emotions. On the other hand, for the best case shown in <xref rid="figure8" ref-type="fig">Figure 8</xref>, we observe clearer patterns in spatial context, activities, and emotional states over time despite a large amount of missing data. For example, in the best case, the person’s emotional state is <italic>dissuaded</italic> while lying down and <italic>pleased</italic> while watching television at home. The average case shown in <xref rid="figure9" ref-type="fig">Figure 9</xref> exhibits some clear patterns of spatial context, activities, and emotional states over time. For example, a person reported <italic>pleasure</italic> mostly while being with friends and <italic>dissuaded</italic> or <italic>discordant</italic> while sleeping at home or outdoors. Therefore, regular patterns in lifestyle are important for the predictability of emotional state and transition detection, and this study showed that such patterns can be captured by leveraging ML algorithms and data acquired via smartphones and consumer-grade wearable devices.</p>
      <fig id="figure7" position="float">
        <label>Figure 7</label>
        <caption>
          <p>Daily life versus emotional states of person 2 (worst case). The x-axis plots 288 windows per day, and the y-axis plots the number of days in the data collection period of person 2. The color-coded regions represent (a) spatial contexts, (b) activities, and (c) emotional states in each window over the period of data collection (8 days). The white regions represent missing data.</p>
        </caption>
        <graphic xlink:href="mhealth_v8i9e17818_fig7.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
      </fig>
      <fig id="figure8" position="float">
        <label>Figure 8</label>
        <caption>
          <p>Daily life versus emotional states of person 9 (best case). The x-axis plots 288 windows per day, and the y-axis plots the number of days in the data collection period of person 9. The color-coded regions represent (a) spatial contexts, (b) activities, and (c) emotional states in each window over the period of data collection (8 days). The white regions represent missing data.</p>
        </caption>
        <graphic xlink:href="mhealth_v8i9e17818_fig8.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
      </fig>
      <fig id="figure9" position="float">
        <label>Figure 9</label>
        <caption>
          <p>Daily life versus emotional states of person 14 (average case). The x-axis plots 288 windows per day, and the y-axis plots the number of days in the data collection period of person 9. The color-coded regions represent (a) spatial contexts, (b) activities, and (c) emotional states in each window over the period of data collection (7 days). The white regions represent missing data.</p>
        </caption>
        <graphic xlink:href="mhealth_v8i9e17818_fig9.png" alt-version="no" mimetype="image" position="float" xlink:type="simple"/>
      </fig>
      <sec>
        <title>Limitations</title>
        <p>There are limitations in this study. First, the results are on the basis of a relatively small data set from a small geographical area. In addition, the subjects lacked diversity in age and occupation as the majority were students and researchers at UCSD. Moreover, some spatiotemporal patterns may not have been captured in the data due to large amounts of missing values as well as limited data collection periods (maximum 9 days).</p>
        <p>Owing to the small number of participants included in the data set, it was infeasible to hold a test set in conjunction with cross-validation for hyperparameter tuning. As a result, the classification performances reported in this paper are likely overestimated.</p>
        <p>In addition, the emotional transition and state classes were highly imbalanced, where 1 or 2 classes of emotional states were absent in some persons’ data. Therefore, we suggest replicating our experiments on larger data sets obtained from diverse populations and geographic locations for longer periods of time.</p>
        <p>Furthermore, the contextual labels that the classifications were based on were self-reported. Reliance on self-reported data is another limitation of the data set. We assumed that this self-reported information was correct in all cases. Hence, the results from this study partially depend on the accuracy of this self-reported information. To extend this study toward truly passive emotional monitoring, future research should explore eliminating self-reporting by predicting contextual information on the basis of raw sensor data.</p>
        <p>Although mapping the emotions into the PAD system results in 3 dimensions, we focused only on the most dominant one. This simplified the rich, multidimensional information that the PAD system provided for making classification tasks more feasible. An alternative is to create a new emotion mapping system specifically for the ExtraSensory data set via clustering in the 3D space defined by PAD. This is a worthwhile future research direction.</p>
        <p>Another major limitation is the absence of health-related information such as BMI, gender, age, and mental health biomarkers in the data. Therefore, further investigation is needed to shed light on the association between health status and emotional transition and state of persons.</p>
      </sec>
      <sec>
        <title>Conclusions</title>
        <p>In this study, we explored the feasibility of detecting emotional transitions and states by applying ML techniques to daily data captured via smartphones and smartwatches. Our results established an association between emotional transition and state and contextual information. We also investigated the salient contextual variables influencing emotional states and transitions. The interpersonal variability in our results bolsters the need for further research on personalized prediction of emotional states and transitions. The findings of this study support the utility of passive data collection, reduced self-reporting, enhanced tracking of psychological well-being, self-awareness, self-management, and risk prediction and just-in-time interventions.</p>
      </sec>
    </sec>
  </body>
  <back>
    <app-group>
      <supplementary-material id="app1">
        <label>Multimedia Appendix 1</label>
        <p>Dataset description and extended experimental results.</p>
        <media xlink:href="mhealth_v8i9e17818_app1.docx" xlink:title="DOCX File , 60 KB"/>
      </supplementary-material>
    </app-group>
    <glossary>
      <title>Abbreviations</title>
      <def-list>
        <def-item>
          <term id="abb1">ANEW</term>
          <def>
            <p>Affective Norms for English Words</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb2">AUROC</term>
          <def>
            <p>area under the receiver operating characteristic</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb3">CB</term>
          <def>
            <p>CatBoost</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb4">LR</term>
          <def>
            <p>logistic regression</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb5">ML</term>
          <def>
            <p>machine learning</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb6">PAD</term>
          <def>
            <p>pleasure, arousal, dominance</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb7">RF</term>
          <def>
            <p>random forest</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb8">SHAP</term>
          <def>
            <p>shapley additive explanation</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb10">SVMSMOTE</term>
          <def>
            <p>Support Vector Machines Synthetic Minority Over-sampling Technique</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb11">UCSD</term>
          <def>
            <p>University of California, San Diego</p>
          </def>
        </def-item>
        <def-item>
          <term id="abb12">XGB</term>
          <def>
            <p>XGBoost</p>
          </def>
        </def-item>
      </def-list>
    </glossary>
    <ack>
      <p>This work was supported by a Postdoctoral Scholarship from the O’Brien Institute for Public Health and Research Funding from the Libin Cardiovascular Institute of Alberta at the University of Calgary.</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="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Saeb</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Zhang</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Kwasny</surname>
              <given-names>MM</given-names>
            </name>
            <name name-style="western">
              <surname>Karr</surname>
              <given-names>CJ</given-names>
            </name>
            <name name-style="western">
              <surname>Kording</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Mohr</surname>
              <given-names>DC</given-names>
            </name>
          </person-group>
          <article-title>The relationship between clinical, momentary, and sensor-based assessment of depression</article-title>
          <source>Int Conf Pervasive Comput Technol Healthc</source>
          <year>2015</year>
          <month>08</month>
          <volume>2015</volume>
          <fpage>-</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://europepmc.org/abstract/MED/26640739"/>
          </comment>
          <pub-id pub-id-type="doi">10.4108/icst.pervasivehealth.2015.259034</pub-id>
          <pub-id pub-id-type="medline">26640739</pub-id>
          <pub-id pub-id-type="pmcid">PMC4667797</pub-id>
        </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>Pratap</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Atkins</surname>
              <given-names>DC</given-names>
            </name>
            <name name-style="western">
              <surname>Renn</surname>
              <given-names>BN</given-names>
            </name>
            <name name-style="western">
              <surname>Tanana</surname>
              <given-names>MJ</given-names>
            </name>
            <name name-style="western">
              <surname>Mooney</surname>
              <given-names>SD</given-names>
            </name>
            <name name-style="western">
              <surname>Anguera</surname>
              <given-names>JA</given-names>
            </name>
            <name name-style="western">
              <surname>Areán</surname>
              <given-names>PA</given-names>
            </name>
          </person-group>
          <article-title>The accuracy of passive phone sensors in predicting daily mood</article-title>
          <source>Depress Anxiety</source>
          <year>2019</year>
          <month>01</month>
          <volume>36</volume>
          <issue>1</issue>
          <fpage>72</fpage>
          <lpage>81</lpage>
          <pub-id pub-id-type="doi">10.1002/da.22822</pub-id>
          <pub-id pub-id-type="medline">30129691</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref3">
        <label>3</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Servia-Rodríguez</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Rachuri</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Mascolo</surname>
              <given-names>C</given-names>
            </name>
          </person-group>
          <article-title>Mobile Sensing at the Service of Mental Well-being: A Large-scale Longitudinal Study</article-title>
          <source>Proceedings of the 26th International Conference on World Wide Web</source>
          <year>2017</year>
          <conf-name>WWW'17</conf-name>
          <conf-date>April 3-7, 2017</conf-date>
          <conf-loc>Perth, Australia</conf-loc>
          <pub-id pub-id-type="doi">10.1145/3038912.3052618</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>Jacobson</surname>
              <given-names>NC</given-names>
            </name>
            <name name-style="western">
              <surname>Weingarden</surname>
              <given-names>H</given-names>
            </name>
            <name name-style="western">
              <surname>Wilhelm</surname>
              <given-names>S</given-names>
            </name>
          </person-group>
          <article-title>Digital biomarkers of mood disorders and symptom change</article-title>
          <source>NPJ Digit Med</source>
          <year>2019</year>
          <volume>2</volume>
          <fpage>3</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://europepmc.org/abstract/MED/31304353"/>
          </comment>
          <pub-id pub-id-type="doi">10.1038/s41746-019-0078-0</pub-id>
          <pub-id pub-id-type="medline">31304353</pub-id>
          <pub-id pub-id-type="pii">78</pub-id>
          <pub-id pub-id-type="pmcid">PMC6550284</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>Torous</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Staples</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Onnela</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>Realizing the potential of mobile mental health: new methods for new data in psychiatry</article-title>
          <source>Curr Psychiatry Rep</source>
          <year>2015</year>
          <month>08</month>
          <volume>17</volume>
          <issue>8</issue>
          <fpage>602</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://europepmc.org/abstract/MED/26073363"/>
          </comment>
          <pub-id pub-id-type="doi">10.1007/s11920-015-0602-0</pub-id>
          <pub-id pub-id-type="medline">26073363</pub-id>
          <pub-id pub-id-type="pmcid">PMC4608747</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref6">
        <label>6</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Difrancesco</surname>
              <given-names>DS</given-names>
            </name>
            <name name-style="western">
              <surname>Fraccaro</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Veer</surname>
              <given-names>SN</given-names>
            </name>
          </person-group>
          <article-title>Out-of-Home Activity Recognition from GPS Data in Schizophrenic Patients</article-title>
          <source>29th International Symposium on Computer-Based Medical Systems</source>
          <year>2016</year>
          <conf-name>CBMS'16</conf-name>
          <conf-date>June 20-24, 2016</conf-date>
          <conf-loc>Dublin, Ireland</conf-loc>
          <pub-id pub-id-type="doi">10.1109/cbms.2016.54</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>Osmani</surname>
              <given-names>V</given-names>
            </name>
          </person-group>
          <article-title>Smartphones in mental health: detecting depressive and manic episodes</article-title>
          <source>IEEE Pervasive Comput</source>
          <year>2015</year>
          <month>07</month>
          <volume>14</volume>
          <issue>3</issue>
          <fpage>10</fpage>
          <lpage>3</lpage>
          <pub-id pub-id-type="doi">10.1109/MPRV.2015.54</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>Suhara</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Xu</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Pentland</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <article-title>DeepMood: Forecasting Depressed Mood Based on Self-Reported Histories via Recurrent Neural Networks</article-title>
          <source>Proceedings of the 26th International Conference on World Wide Web</source>
          <year>2017</year>
          <conf-name>WWW'17</conf-name>
          <conf-date>April 3-7, 2017</conf-date>
          <conf-loc>Perth, Australia</conf-loc>
          <pub-id pub-id-type="doi">10.1145/3038912.3052676</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>Berrouiguet</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Ramírez</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Barrigón</surname>
              <given-names>ML</given-names>
            </name>
            <name name-style="western">
              <surname>Moreno-Muñoz</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Carmona Camacho</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Baca-García</surname>
              <given-names>E</given-names>
            </name>
            <name name-style="western">
              <surname>Artés-Rodríguez</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <article-title>Combining continuous smartphone native sensors data capture and unsupervised data mining techniques for behavioral changes detection: a case series of the evidence-based behavior (EB2) study</article-title>
          <source>JMIR Mhealth Uhealth</source>
          <year>2018</year>
          <month>12</month>
          <day>10</day>
          <volume>6</volume>
          <issue>12</issue>
          <fpage>e197</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://mhealth.jmir.org/2018/12/e197/"/>
          </comment>
          <pub-id pub-id-type="doi">10.2196/mhealth.9472</pub-id>
          <pub-id pub-id-type="medline">30530465</pub-id>
          <pub-id pub-id-type="pii">v6i12e197</pub-id>
          <pub-id pub-id-type="pmcid">PMC6305880</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref10">
        <label>10</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Helbich</surname>
              <given-names>M</given-names>
            </name>
          </person-group>
          <article-title>Toward dynamic urban environmental exposure assessments in mental health research</article-title>
          <source>Environ Res</source>
          <year>2018</year>
          <month>02</month>
          <volume>161</volume>
          <fpage>129</fpage>
          <lpage>35</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://linkinghub.elsevier.com/retrieve/pii/S0013-9351(17)31255-0"/>
          </comment>
          <pub-id pub-id-type="doi">10.1016/j.envres.2017.11.006</pub-id>
          <pub-id pub-id-type="medline">29136521</pub-id>
          <pub-id pub-id-type="pii">S0013-9351(17)31255-0</pub-id>
          <pub-id pub-id-type="pmcid">PMC5773240</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref11">
        <label>11</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Sandstrom</surname>
              <given-names>GM</given-names>
            </name>
            <name name-style="western">
              <surname>Lathia</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Mascolo</surname>
              <given-names>C</given-names>
            </name>
            <name name-style="western">
              <surname>Rentfrow</surname>
              <given-names>PJ</given-names>
            </name>
          </person-group>
          <article-title>Putting mood in context: using smartphones to examine how people feel in different locations</article-title>
          <source>J Res Pers</source>
          <year>2017</year>
          <month>08</month>
          <volume>69</volume>
          <fpage>96</fpage>
          <lpage>101</lpage>
          <pub-id pub-id-type="doi">10.1016/j.jrp.2016.06.004</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>Ma</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Xu</surname>
              <given-names>B</given-names>
            </name>
            <name name-style="western">
              <surname>Bai</surname>
              <given-names>Y</given-names>
            </name>
          </person-group>
          <article-title>Daily Mood Assessment Based on Mobile Phone Sensing</article-title>
          <source>Ninth International Conference on Wearable and Implantable Body Sensor Networks</source>
          <year>2012</year>
          <conf-name>BSN'12</conf-name>
          <conf-date>May 9-12, 2012</conf-date>
          <conf-loc>London, UK</conf-loc>
          <pub-id pub-id-type="doi">10.1109/bsn.2012.3</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref13">
        <label>13</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Asselbergs</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Ruwaard</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Ejdys</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Schrader</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Sijbrandij</surname>
              <given-names>M</given-names>
            </name>
            <name name-style="western">
              <surname>Riper</surname>
              <given-names>H</given-names>
            </name>
          </person-group>
          <article-title>Mobile phone-based unobtrusive ecological momentary assessment of day-to-day mood: an explorative study</article-title>
          <source>J Med Internet Res</source>
          <year>2016</year>
          <month>03</month>
          <day>29</day>
          <volume>18</volume>
          <issue>3</issue>
          <fpage>e72</fpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://www.jmir.org/2016/3/e72/"/>
          </comment>
          <pub-id pub-id-type="doi">10.2196/jmir.5505</pub-id>
          <pub-id pub-id-type="medline">27025287</pub-id>
          <pub-id pub-id-type="pii">v18i3e72</pub-id>
          <pub-id pub-id-type="pmcid">PMC4829730</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref14">
        <label>14</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Wang</surname>
              <given-names>R</given-names>
            </name>
            <name name-style="western">
              <surname>Chen</surname>
              <given-names>F</given-names>
            </name>
            <name name-style="western">
              <surname>Chen</surname>
              <given-names>Z</given-names>
            </name>
          </person-group>
          <article-title>StudentLife: Assessing Mental Health, Academic Performance and Behavioral Trends of College Students Using Smartphones</article-title>
          <source>Proceedings of the 2014 ACM International Joint Conference on Pervasive and Ubiquitous Computing</source>
          <year>2014</year>
          <conf-name>UbiComp'14</conf-name>
          <conf-date>September 13-17, 2014</conf-date>
          <conf-loc>Seattle, USA</conf-loc>
          <pub-id pub-id-type="doi">10.1145/2632048.2632054</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref15">
        <label>15</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Sano</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Phillips</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Yu</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <article-title>Recognizing Academic Performance, Sleep Quality, Stress Level, and Mental Health Using Personality Traits, Wearable Sensors and Mobile Phones</article-title>
          <source>12th International Conference on Wearable and Implantable Body Sensor Networks</source>
          <year>2015</year>
          <conf-name>BSN'15</conf-name>
          <conf-date>June 9-12, 2015</conf-date>
          <conf-loc>Cambridge, MA, USA</conf-loc>
          <pub-id pub-id-type="doi">10.1109/bsn.2015.7299420</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref16">
        <label>16</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Budner</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>Eirich</surname>
              <given-names>J</given-names>
            </name>
            <name name-style="western">
              <surname>Gloor</surname>
              <given-names>P</given-names>
            </name>
          </person-group>
          <article-title>'Making you happy makes me happy' - measuring individual mood with smartwatches</article-title>
          <source>arXiv</source>
          <year>2017</year>
          <comment>epub ahead of print<ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://arxiv.org/abs/1711.06134"/></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>Zhang</surname>
              <given-names>X</given-names>
            </name>
            <name name-style="western">
              <surname>Li</surname>
              <given-names>W</given-names>
            </name>
            <name name-style="western">
              <surname>Chen</surname>
              <given-names>X</given-names>
            </name>
            <name name-style="western">
              <surname>Lu</surname>
              <given-names>S</given-names>
            </name>
          </person-group>
          <article-title>MoodExplorer: Towards Compound Emotion Detection via Smartphone Sensing</article-title>
          <source>Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies</source>
          <year>2018</year>
          <conf-name>ACM'18</conf-name>
          <conf-date>September 9-12, 2018</conf-date>
          <conf-loc>London, UK</conf-loc>
          <pub-id pub-id-type="doi">10.1145/3161414</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref18">
        <label>18</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Umematsu</surname>
              <given-names>T</given-names>
            </name>
            <name name-style="western">
              <surname>Sano</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Picard</surname>
              <given-names>R</given-names>
            </name>
          </person-group>
          <article-title>Daytime Data and LSTM can Forecast Tomorrow’s Stress, Health, and Happiness</article-title>
          <source>41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society</source>
          <year>2019</year>
          <conf-name>EMBC'19</conf-name>
          <conf-date>July 23-27, 2019</conf-date>
          <conf-loc>Berlin, Germany</conf-loc>
          <pub-id pub-id-type="doi">10.1109/embc.2019.8856862</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref19">
        <label>19</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Spathis</surname>
              <given-names>D</given-names>
            </name>
            <name name-style="western">
              <surname>Servia-Rodriguez</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Farrahi</surname>
              <given-names>K</given-names>
            </name>
          </person-group>
          <article-title>Sequence Multi-task Learning to Forecast Mental Wellbeing from Sparse Self-Reported Data</article-title>
          <source>Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery &#38; Data Mining</source>
          <year>2019</year>
          <conf-name>KDD'19</conf-name>
          <conf-date>August 4-8, 2019</conf-date>
          <conf-loc>Anchorage, AK, USA</conf-loc>
          <pub-id pub-id-type="doi">10.1145/3292500.3330730</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>Russell</surname>
              <given-names>JA</given-names>
            </name>
          </person-group>
          <article-title>A circumplex model of affect</article-title>
          <source>J Pers Soc Psychol</source>
          <year>1980</year>
          <volume>39</volume>
          <issue>6</issue>
          <fpage>1161</fpage>
          <lpage>78</lpage>
          <pub-id pub-id-type="doi">10.1037/h0077714</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>Bakker</surname>
              <given-names>I</given-names>
            </name>
            <name name-style="western">
              <surname>van der Voordt</surname>
              <given-names>T</given-names>
            </name>
            <name name-style="western">
              <surname>Vink</surname>
              <given-names>P</given-names>
            </name>
            <name name-style="western">
              <surname>de Boon</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <article-title>Pleasure, arousal, dominance: Mehrabian and Russell revisited</article-title>
          <source>Curr Psychol</source>
          <year>2014</year>
          <month>06</month>
          <day>11</day>
          <volume>33</volume>
          <issue>3</issue>
          <fpage>405</fpage>
          <lpage>21</lpage>
          <pub-id pub-id-type="doi">10.1007/s12144-014-9219-4</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref22">
        <label>22</label>
        <nlm-citation citation-type="web">
          <article-title>The ExtraSensory Dataset</article-title>
          <source>Yonatan Vaizman - University of California San Diego</source>
          <access-date>2020-08-24</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://extrasensory.ucsd.edu/">http://extrasensory.ucsd.edu/</ext-link>
          </comment>
        </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>Vaizman</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Ellis</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Lanckriet</surname>
              <given-names>G</given-names>
            </name>
          </person-group>
          <article-title>Recognizing detailed human context in the wild from smartphones and smartwatches</article-title>
          <source>IEEE Pervasive Comput</source>
          <year>2017</year>
          <month>10</month>
          <volume>16</volume>
          <issue>4</issue>
          <fpage>62</fpage>
          <lpage>74</lpage>
          <pub-id pub-id-type="doi">10.1109/mprv.2017.3971131</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref24">
        <label>24</label>
        <nlm-citation citation-type="book">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Mehrabian</surname>
              <given-names>A</given-names>
            </name>
            <name name-style="western">
              <surname>Russell</surname>
              <given-names>J</given-names>
            </name>
          </person-group>
          <source>An Approach to Environmental Psychology</source>
          <year>1974</year>
          <publisher-loc>New York, USA</publisher-loc>
          <publisher-name>MIT Press</publisher-name>
        </nlm-citation>
      </ref>
      <ref id="ref25">
        <label>25</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Russell</surname>
              <given-names>JA</given-names>
            </name>
            <name name-style="western">
              <surname>Mehrabian</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <article-title>Evidence for a three-factor theory of emotions</article-title>
          <source>J Res Pers</source>
          <year>1977</year>
          <month>09</month>
          <volume>11</volume>
          <issue>3</issue>
          <fpage>273</fpage>
          <lpage>94</lpage>
          <pub-id pub-id-type="doi">10.1016/0092-6566(77)90037-x</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref26">
        <label>26</label>
        <nlm-citation citation-type="web">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Bradley</surname>
              <given-names>MM</given-names>
            </name>
            <name name-style="western">
              <surname>Lang</surname>
              <given-names>PJ</given-names>
            </name>
          </person-group>
          <article-title>Affective Norms for English Words (ANEW): Instruction Manual and Affective Ratings</article-title>
          <source>Semantic Scholar</source>
          <year>1999</year>
          <access-date>2020-09-01</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://www.uvm.edu/pdodds/teaching/courses/2009-08UVM-300/docs/others/everything/bradley1999a.pdf">https://www.uvm.edu/pdodds/teaching/courses/2009-08UVM-300/docs/others/everything/bradley1999a.pdf</ext-link>
          </comment>
        </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>Warriner</surname>
              <given-names>AB</given-names>
            </name>
            <name name-style="western">
              <surname>Kuperman</surname>
              <given-names>V</given-names>
            </name>
            <name name-style="western">
              <surname>Brysbaert</surname>
              <given-names>M</given-names>
            </name>
          </person-group>
          <article-title>Norms of valence, arousal, and dominance for 13,915 English lemmas</article-title>
          <source>Behav Res Methods</source>
          <year>2013</year>
          <month>12</month>
          <volume>45</volume>
          <issue>4</issue>
          <fpage>1191</fpage>
          <lpage>207</lpage>
          <pub-id pub-id-type="doi">10.3758/s13428-012-0314-x</pub-id>
          <pub-id pub-id-type="medline">23404613</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref28">
        <label>28</label>
        <nlm-citation citation-type="confproc">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Vaizman</surname>
              <given-names>Y</given-names>
            </name>
            <name name-style="western">
              <surname>Ellis</surname>
              <given-names>K</given-names>
            </name>
            <name name-style="western">
              <surname>Lanckriet</surname>
              <given-names>G</given-names>
            </name>
          </person-group>
          <article-title>ExtraSensory App: Data Collection In-the-Wild with Rich User Interface to Self-Report Behavior</article-title>
          <source>Proceedings of the 2018 CHI Conference on Human Factors in Computing Systems</source>
          <year>2018</year>
          <conf-name>CHI'18</conf-name>
          <conf-date>April 21-26, 2018</conf-date>
          <conf-loc>Montreal, QC, Canada</conf-loc>
          <pub-id pub-id-type="doi">10.1145/3173574.3174128</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref29">
        <label>29</label>
        <nlm-citation citation-type="web">
          <source>Geohash</source>
          <access-date>2020-08-25</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://geohash.org">http://geohash.org</ext-link>
          </comment>
        </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>Chawla</surname>
              <given-names>NV</given-names>
            </name>
            <name name-style="western">
              <surname>Bowyer</surname>
              <given-names>KW</given-names>
            </name>
            <name name-style="western">
              <surname>Hall</surname>
              <given-names>LO</given-names>
            </name>
            <name name-style="western">
              <surname>Kegelmeyer</surname>
              <given-names>WP</given-names>
            </name>
          </person-group>
          <article-title>SMOTE: synthetic minority over-sampling technique</article-title>
          <source>J Artif Intell Res</source>
          <year>2002</year>
          <month>06</month>
          <day>1</day>
          <volume>16</volume>
          <fpage>321</fpage>
          <lpage>57</lpage>
          <pub-id pub-id-type="doi">10.1613/jair.953</pub-id>
        </nlm-citation>
      </ref>
      <ref id="ref31">
        <label>31</label>
        <nlm-citation citation-type="web">
          <article-title>mHealth Emotional State-Transition Detection Public</article-title>
          <source>GitHub</source>
          <access-date>2020-08-25</access-date>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://github.com/data-intelligence-for-health-lab/mHealth_Emotional_State-Transition_Detection_Public">https://github.com/data-intelligence-for-health-lab/mHealth_Emotional_State-Transition_Detection_Public</ext-link>
          </comment>
        </nlm-citation>
      </ref>
      <ref id="ref32">
        <label>32</label>
        <nlm-citation citation-type="book">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Lundberg</surname>
              <given-names>SM</given-names>
            </name>
            <name name-style="western">
              <surname>Lee</surname>
              <given-names>SI</given-names>
            </name>
          </person-group>
          <article-title>A unified approach to interpreting model predictions</article-title>
          <source>Advances in Neural Information Processing Systems</source>
          <year>2017</year>
          <publisher-loc>New York, USA</publisher-loc>
          <publisher-name>MIT Press</publisher-name>
        </nlm-citation>
      </ref>
      <ref id="ref33">
        <label>33</label>
        <nlm-citation citation-type="journal">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Jaques</surname>
              <given-names>N</given-names>
            </name>
            <name name-style="western">
              <surname>Taylor</surname>
              <given-names>S</given-names>
            </name>
            <name name-style="western">
              <surname>Sano</surname>
              <given-names>A</given-names>
            </name>
          </person-group>
          <article-title>Predicting tomorrow’s mood, health, and stress level Using personalized multitask learning and Domain adaptation</article-title>
          <source>J Mach Learn Res</source>
          <year>2017</year>
          <volume>66</volume>
          <fpage>17</fpage>
          <lpage>33</lpage>
          <comment>
            <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="http://proceedings.mlr.press/v66/jaques17a.html">http://proceedings.mlr.press/v66/jaques17a.html</ext-link>
          </comment>
        </nlm-citation>
      </ref>
    </ref-list>
  </back>
</article>
