## 2 Related Work  
According to the work of [9], sleep medicine will look forward to big data as a means to massive health management, increased automated care delivery, patient self-care capabilities, predictive analytics for providing clinical decision support, peer-to-peer support opportunities, and effective real-time patient monitoring. Accordingly, remote monitoring of CPAP allows one to follow the progress of apnea and detect acute events, providing confidence to the patient and reducing the number of follow-up visits. Fulfilling these expectations requires efficient analytical methods; in the case of apnea monitoring, the challenge is to digest long series of telemonitoring signals. For this reason, it is arguable that physicians must consult patient data daily and react to alarms. However, according to [9] this is infeasible in countries such as the USA due to the busy work schedule of physicians. In the context of assessing CPAP-based therapies, ref. [17] affirms the existence of heterogeneity between patients with OSA concerning comorbidities and symptoms. Following this hypothesis, ref. [18] used clustering techniques to detect OSA phenotypes (classes of patients) considering 13 clinical variables; next, they compared the five classes they found to clusters obtained with CPAP-treatment outcomes observed during 6 months of therapy. Their results indicated a strong agreement between the two sets of clusters, suggesting that cluster analysis is an opportunity for the clinical characterization of patients with OSA. We pursue this diagnosis approach by introducing a characterization of patients considering the time of CPAP use, a metric that points out how well the adherence to the therapy has been, and that we translate into a scale of discrete numbers. The work of [18] provides interesting insights regarding the relationship of CPAP use and clinical indicators; similarly to them, we use clustering techniques to find meaningful characterizations of apnea patients but, differently, we do not aggregate the CPAP outcome into one single value, neither we analyze the whole time series of CPAP therapy at once. In the work of [19], the authors considered a cohort containing only patients with moderate to severe OSA, as indicated by the metric Apnea-Hypopnea Index (AHI) measured by polysomnography breathing monitoring, the gold standard for OSA diagnosis. Their goal was to detect the phenotypes in a universe of well-characterized OSA patients. Using hierarchical clustering methods over variables related to age, sex, symptoms, obesity, comorbidities, and environmental risk factors, they found six clusters, each with a statistically distinct profile. In common with our work, ref. [19] use unsupervised machine learning to characterize patients (phenotypes); differently, while they consider a snapshot of the patients' clinical symptoms, we use the constant flow of telemonitoring data to characterize the course of periods of the CPAP therapy. The innovation of our approach comes from the dynamic nature of our method, which can capture the constant-changing circumstances of the therapy. Reference [20] point out that, although AHI is the most used metric for OSA severity, it does not correlate well in all the clinical scenarios. Other signals might be useful for detecting endotypes, so to target treatments more precisely to specific patient traits. In a similar line of thought, we advocate that understanding other factors beyond AHI has the potential to assist the physician in determining the necessary therapy intervention [21]. Accordingly, we proceed by inspecting the CPAP use telemonitoring signal (hours of use), focusing on the characterization of the ups and downs, regularities, and irregularities during the patient's adaptation to the therapy, allowing the physician to detect problems that require intervention. Similar to our work, ref. [22] exploits the number of hours of CPAP use to characterize patients with respect to therapy adherence.