## 5 Discussion and Limitations  
The difficulty of acquiring large training sets of accurately labeled data is a challenging issue in computing and behavior recognition, due to problems of labeling costs and privacy issues [37]. Hence, the experimental evaluation of our work is relatively limited by the dimensions of the available dataset. Our results are, however, in line with those found in the literature. In [38], the authors presented a system to predict sleep quality through the analysis of EEG signals and health and lifestyle information such as ethnicity, gender, education, marital status, age, height, hip and waist circumference, body mass index, weight, and caffeine or alcohol intake. The model is composed of a recurrent neural network that analyzes and extracts information from EEG signals and a regression algorithm that, by analyzing the inferred information from EEG and the most traditional features, predicts sleep quality. The results were evaluated using the coefficient of determination \(r^{2}\), which is  
Figure 10: Results of the questionnaire. equal to the square of the Pearson correlation coefficient \(r\)[39]. The algorithms chosen by the authors were the random forest, AdaBoost, gradient boosting regression, support vector machine, and multilayer perceptron. The best results were obtained in the prediction of the self-reported sleep duration, while, for the prediction of the depth of sleep, the prediction of sleep restfulness, and the prediction of sleep quality compared to the usual, the \(r^{2}\) values obtained were all less than 0.2, corresponding to \(r\sim 0.44\). Furthermore, since massive data about users' behavior and sleep quality are not currently available, we could not apply deep learning algorithms, which are known to perform well in this kind of task [24; 40] but require very large training sets [41]. As a consequence, we adopted classical ML algorithms that may provide good recognition rates even with few examples [42]. In particular, the random tree algorithm has proven to be effective in sleep monitoring systems [27]. Indeed, based on the achieved results, we can observe a statistical correlation between the forecast of our system and the actual sleep quality perceived by the individual. However, the achieved Pearson correlation value indicates only a moderate correlation. We believe that training the model with more instances would lead to a relevant increase in the recognition performance; however, this should be confirmed by experiments. As anticipated, with a larger dataset size, predictions of sleep quality could be improved using deep learning methods. The use of deep learning techniques, on the other hand, would make it more difficult to provide easily understandable explanations, due to the extreme complexity of deep learning models [43]. Another limitation of our system is the type of sensors used, which is limited to smartphone sensors. Indeed, integrating other sensors in our system, such as wearables and environmental sensors, would provide additional information to improve sleep forecasting. The most innovative contribution of our work is the use of LLM to explain the factors influencing the sleep quality forecasts of the ML reasoner, and to provide transparent, context-aware suggestions aimed at enhancing sleep quality. The objective is to foster trust and encourage users' involvement, empowering them to take an active part in improving their sleep. Concerning this aspect of the system, an initial user study indicated that providing explanations on sleep quality forecasts and suggestions to improve it increases the trust, usefulness, and understanding of the system. However, these results should be confirmed through a larger study involving a vast number of volunteers. A longer user study would also allow us to assess the users' adherence to the system's suggestions and to quantitatively assess improvements in sleep quality.