# Anomaly Detection in Elderly Health Monitoring via IoT for Timely Interventions
## 4 Discussion
In contrast, the algorithm integrated into HADA can run on an IoT and cloud architecture, reducing response time without affecting anomaly detection. Lastly, the concern regarding the system's precision and the possibility of false alarms is valid. However, it is important to understand that the system's high recall rate and sensitivity ensure that no health issues are left undetected. As we continue to refine the system, future work could focus on improving the precision, potentially through more advanced anomaly detection techniques and by incorporating real-world testing with larger populations. The authors chose to generalize the HADA using modern techniques represented by synthetic data. This is justified by the need to continuously monitor a large number of elderly people over a long period, at least one year. This would also require their declaration regarding consent for data use, as was performed with the real dataset presented earlier. Moreover, the present research does not represent a clinical study but rather a hardware-software prototype that can be developed for production with specific implications for medical protocols. Any medicated device must undergo a series of standard stages before it can be used and is not the subject of the present research. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithm** & **Metrics Obtained** & \begin{tabular}{c} **Response** \\ **Time** \\ \end{tabular} & **Infrastructure** \\ \hline Autoencoder [52] & \begin{tabular}{c} Average reconstruction \\ accuracy: 99.9\% \\ \end{tabular} & 3 ms & \begin{tabular}{c} IoT– \\ Edge Computing \\ IoT \\ \end{tabular} \\ One-Class SVM [53] & \begin{tabular}{c} Accuracy for heart attack: 82\% \\ Anomaly detection rate: 95\% \\ Anomalies for blood pressure: \\ \end{tabular} & 2.5 s & IoT \\ ResNet-LSTM [55] & \begin{tabular}{c} MAE: 6.2 mmHg; RMSE: \\ 8.9 mmHg; \\ Accuracy: 100\% \\ \end{tabular} & NS & \begin{tabular}{c} IoT + Cloud \\ \end{tabular} \\ RF + SVM [56] & \
\begin{tabular}{c} Accuracy: 100\% \\ Accuracy: 98.5\% \\ \end{tabular} & 16.3 s & Cloud \\ HADA (proposed by \\ the authors) &
\begin{tabular}{c} Accuracy: 98.5\% \\ \end{tabular} & 3.5 s & IoT + Cloud \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparative analysis of algorithms from the state-of-the-art and HADA. As mentioned, synthetic data was added to the tests to generalize the model. Thus, six datasets were introduced for six elderly individuals. The synthetic data were generated according to the values in the specialized literature. For elderly individuals without specific heart conditions, the normal heart rate range is between 60 and 100 beats per minute (bpm). This value is influenced by factors such as medication, hypertension, heart disease, or other stress factors [65]. Additionally, elderly individuals experience changes in sleep architecture, according to the study conducted by [PERSON] et al. [66]. Thus, elderly people spend 10-15% of the total 7-8 h in deep sleep. Superficial sleep corresponds to a more extended period and is associated with the first two stages of sleep. Therefore, out of the total 7-8 h of sleep, an elderly person spends, on average, 1-2 h in deep sleep and 4-5 h in shallow sleep [67; 68]. Regarding regular physical activities, the general recommendation for the elderly is at least 150 min of moderate to intense aerobic activity per week. This corresponds to 7000-8000 daily steps for a healthy older adult [69]. Considering these observations, the six experimental datasets were generated according to the standard values. Each dataset contains 1000 synthetic data points. Of the 1000 data points, 30% contain intentionally generated anomalies to simulate an emergency. According to the literature, the anomalies correspond to exceedances of the values considered normal. These observations generated six experimental datasets based on typical values. Each dataset contains 1000 synthetic data points. Of the 1000 data points, 1% contain intentionally generated anomalies to simulate an emergency.