# Anomaly Detection in Elderly Health Monitoring via IoT for Timely Interventions
## 2 Materials and Methods
### Monitored Parameters and Analyzed Dataset  
The identification of health status and prevention of incidents in elderly individuals is achieved through real-time processing of the following parameters:  
* AR represents the average pulse value calculated at predefined time intervals. Through this parameter, a general overview of cardiovascular activity is identified. In this way, trends that may indicate a suboptimal health condition are detected.
* mR is the minimum recorded pulse value and is monitored to detect any episodes of bradycardia. Such an incident requires prompt medical intervention and is a zero-level alert.
* MR records the maximum pulse values, abnormal values being associated with tachycardia situations. These fluctuations can signal cardiovascular stress or other acute cardiac issues, also constituting zero-level alerts.
* S monitors the number of daily steps taken. This parameter serves as an indicator of physical activity level. This parameter contributes to assessing mobility and overall health status, not being one that generates a major alert.
* DST indicates the time spent in the deep sleep phase. This parameter identifies the body's recovery capacity and physical resource restoration.  
* SST monitors the time spent in the superficial sleep phase. This parameter helps evaluate overall sleep quality, providing clues about disturbances or imbalances in rest cycles. The first three parameters are quantified in BPM, S is measured in the number of steps, and the last two in minutes, as shown in Figure 1, which presents the feature diagram for the dataset built for a single patient. If an anomaly is identified, the output of the employee's anomaly analyzer algorithm is 1. In this case, an alert is released. Otherwise, the output is 0.  
The dataset is built using the six parameters presented in Figure 1. These enable the monitoring of the health status of elderly patients. The analysis must be personalized because each patient has unique traits, depending on the medication, their specific body configuration, lifestyle, and activity levels. Thus, thresholds for parameters can vary significantly from one patient to another. It is important to note that these parameters were selected based on their correlation with early warning signs. They encompass cardiovascular health, physical activity, and sleep patterns, collectively providing a holistic health assessment. Moreover, the variability of threshold values among individuals is addressed through personalized baseline adjustments. The threshold values for each patient can be customized by the treating doctor, who is familiar with the patient's medical history. By analyzing the collected data, the doctor can establish personalized thresholds that accurately reflect the patient's health status and specific medical needs. Based on these considerations, a unique analysis is required for each monitored person. This unique model enables precise alerts tailored to personalized statistics for each individual. Therefore, the dataset is built for a single patient because individualized monitoring enables obtaining a detailed and accurate profile of vital parameters without the interference caused by inter-individual variability. The analyzed dataset spans a two-year period, from 1 January 2023 to 31 December 2024. The frequency of activity data for life-threatening parameters (AR, mR, and MR) is 725,338 records, while the general state parameter S contains 9455 records, and the rest (DST and SST) contain 680. The output of the anomaly analyzer is referred to as a label.