# Anomaly Detection in Elderly Health Monitoring via IoT for Timely Interventions
## 3 Results
### HADA Integrated into the Developed Model  
Using HADA for the inputs AR, mR, MR, S, DST, and SST, the analysis examines the relationships among these variables, generating a model that is inaccessible to mathematicians or statisticians. The model analyzes values with different representation domains simultaneously. This is almost impossible for a human, who typically performs analyses only on individual values and, at most, can combine them afterward. For example, a specific behavior may be expected in one context (for one parameter) but be abnormal in another context (for another parameter). For instance, MR may be normal in sports but abnormal when accompanied by a low DST. Therefore, analysis in a multidimensional space (with multiple features) helps establish a dependency between parameters, also considering the specificities of the context for which the training is performed. If each parameter were analyzed individually, then anomalies generated by correlations might be missed. For example, if SST is too low, AR is too high, and S is very elevated simultaneously, this behavior may indicate an anomaly that is not visible in the case of individual analysis. To address these situations, HADA uses a multidimensional anomaly model. The algorithm for identifying anomalies is based on PCA. It is integrated into ML_NET under the name RandomizedPCA. The algorithm specializes in identifying the main directions of variation in a dataset. These directions are used to reduce the dimensionality of the data. Subsequently, those that determine the residual values are extracted. This determines a deviation from the principal component of the data. This is useful when you want to find observations that do not follow the general patterns of the data trend. The HADA model was developed to identify anomalies in data collected from an elderly person using six features: AR, mR, MR, DST, SST, and S. In the case of PCA, there is  
Figure 8: Frequency measurements per day of the monitored patient: (**a**) heart rate; (**b**) DST; (**c**) SST; (**d**) parameter S.  
no direct correlation with the number of neurons and layers, as PCA is a dimensionality reduction method rather than a neural network-based model. The purpose of HADA is to detect anomalies in the monitoring data of elderly individuals, triggering alerts for caregivers to enable rapid intervention. Usually, the number of detected anomalies should be as low as possible. However, detecting many anomalies may indicate that the model is too sensitive, generating excessive false alerts, i.e., alerts that are not caused by real health issues. Conversely, this situation is still preferable. In the opposite case, detecting a few anomalies could mean that the model is not sensitive enough to identify real health problems or hazardous behaviors, putting the elderly person's life at risk. For this reason, in the study of hyperparameter configuration, it is desirable to identify a larger number of anomalies, even if they are false. For ensureZeroMean = TRUE, Figure 9 shows that many of the combinations with rank = 1 identified a large number of anomalies (18). This could be useful in scenarios where we want to identify any sign of anomalies, but it might lead to too many alerts and false positives. For ensureZeroMean = FALSE, Figure 10 shows combinations with rank = 1 and rank = 2, detecting only 0 or 1 anomalies. This may indicate less sensitive performance and could reduce false alerts. However, it might also lead to missing important signs of health problems. The seed q can influence decisions about when to trigger an alert. It helps balance the model's sensitivity with alert precision. For example, a q that produces many false alerts could cause the model to generate constant warnings, which might be disruptive. On the other hand, a q that produces too few anomalies might result in real health problems of the elderly being overlooked. A moderate number of anomalies is ideal in elderly monitoring.