**1. Introduction**

Mental health refers to the psychological, social, and emotional well-being, so influencing our behaviors, feelings, and thoughts. Mental well-being contributes to individuals perceive their skills, work productively, contribute to their community, interact with other people, and recover from their daily routine stresses [1]. Mental disorder is a term used to describe mental health problems, such as depression, schizophrenia, and social anxiety. These disorders are responsible for affecting aspects such as mood, sleep, personality, thoughts, and social relationships [2]. Mental disorders are a health problem prevalent in a large part of the world population, affecting about 700 million people worldwide [3].

**Citation:** Moura, I.; Teles, A.; Endler, M.; Coutinho, L.; Silva, F. Recognizing Context-Aware Human Sociability Patterns Using Pervasive Monitoring for Supporting Mental Health Professionals. *Sensors* **2021**, *21*, 86. https://dx.doi.org/10.3390/ s21010086

Received: 27 September 2020 Accepted: 15 December 2020 Published: 25 December 2020

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/ licenses/by/4.0/).

Depression is a mental disorder that affects more than 300 million people worldwide, while around 800,000 people commit suicide each year [4]. Therefore, it is possible to recognize that the prevalence of mental health problems has reached a significant part of the world population.

Mental disorders cause behavioral change that represents a relevant indicator of their onset, presence, or development. These behavioral changes are situations of interest to mental health professionals since they are used as a basis for performing assessments and interventions. In particular, social behavior changes can represent relevant indicators of mental disorders as individuals' sociability has significant implications for their state of well-being [5]. Social relationships' characteristics can represent aspects capable of protecting or contributing to the development of mental disorders. For example, there is evidence that social support is a relevant factor for mental health [6,7], since there is a higher likelihood of depression among people who do not have social support. There is also evidence that social isolation is associated with mental health problems, such as depression, anxiety, and suicidal ideation [8]. Moreover, social isolation imposed to reduce the rate of contagion by the COVID-19 coronavirus may further impact global mental health [9]. Therefore, symptoms of mental disorders can be externalized through changes in social behaviors, so characterizing a situation of interest for monitoring mental health.

Traditional methods of evaluating social behavior performed by mental health professionals are based on clinical evidence and information self-reported by the patient [10]. These approaches generally use retrospective reports of social experiences lived by individuals in their daily lives, in which memory time can be days, weeks, and even months. As a result, cognitive biases limit these methods, hence contributing to an incoherent exposure of the lived experience [11,12]. For example, memory bias can prevent patients from reporting their feelings and behaviors accurately [11]. Social desirability bias encourages patients to hide or modify the truth of their reports to achieve socially desirable results [12]. The clinical context in which mental health assessments occur is also a limitation since it does not represent the patients' natural environment, implying a low ecological validity of traditional mental health assessment methods.

Currently, ubiquitous devices (e.g., smartphones, smartwatches, smart bands, and fitness bracelets) represent a promising means of mitigating those limitations [13]. The pervasive nature of these devices combined with a large amount of behavioral data from their sensors make ubiquitous computing a natural option to incorporate new system proposals for monitoring social behaviors related to mental health. Among the methodologies in this research area, the approach called Digital Phenotyping stands out. The term Digital Phenotyping refers to "moment-by-moment quantification of the individual-level human phenotype in-situ using data from smartphones and other personal digital devices" [14]. The goal of digital phenotyping is to learn and monitor patterns overtime that characterize behaviors of individuals (e.g., physical activities performed, their social interactions and mobility), based on context data derived from mobile, wearable, and Internet of Things (IoT) computing devices [13]. By using this concept, it is possible to create computational mechanisms able to perform continuous and discrete detection of individuals' social behaviors [15]. These mechanisms can integrate computerized systems of Ecological Momentary Assessment (EMA) and Ecological Momentary Intervention (EMI), which allow mental health professionals to collect daily behavioral information from their patients and perform interventions in their natural environment. These solutions contribute to the effectiveness of the treatment and provide real-time support to the patients' daily life.

The current literature presents solutions that use pervasive devices to recognize social behaviors related to mental health [13,16,17]. These solutions usually aim to make association, detection, classification, and prediction of mental states through features of the identified social situations [17]. However, there is still a need to develop solutions capable of recognizing sociability patterns representing the patients' social routine, so providing a valuable tool for assessing social behavior. Consequently, it is also essential to develop solutions to monitor changes in a patient's sociability pattern because these behavioral changes can mean the manifestation of mental disorders.

Given the need to objectively monitor social behavior, this study proposes a solution for processing social activity derived from pervasive devices to detect context-aware sociability patterns and social behavior changes. The proposed approach is able to perform incremental learning of context-aware sociability patterns through the combination of Frequent Pattern Mining (FPM) [18] and Complex Event Processing (CEP) [19]. Specifically, our proposed solution detects the time intervals in which social activities habitually occur. The recognition of sociability patterns is performed for specific contexts (e.g., weekdays, rainy days, and weekends), which enables the identification of behavior variability in different context conditions. The proposed solution is also able to identify changes in sociability patterns that reflect abnormal social behaviors and variations in social routines.

This article is an extended version of [20], where we outlined our approach to detect sociability patterns, but we did not present the solution for identifying changes in social behaviors. This paper has the following contributions: (i) we present an update of the formalization of the algorithm to detect context-aware sociability patterns; (ii) we introduce a solution for recognizing abnormal social behaviors and social routine changes; (iii) we use fuzzy logic to model knowledge of the mental health specialist needed to recognize social behavior changes; (iv) we evaluate the ability of the sociability patterns identified by the proposed solution to explain and predict users' social behaviors; and (v) we present an extensive analysis to evaluate the social behavior change detection solution.

The remaining of the paper is organized as follows. Section 2 discuss the related works. Section 3 presents the proposed solution to detect context-aware sociability patterns and changes in social behavior. Section 4 exposes an experimental evaluation of the proposed solution using a real-world data stream. In the end, we drive our conclusions and future works in Section 5.
