Abstract
Due to the increase in the global aging population and its associated age-related challenges, various cognitive, physical, and social problems can arise in older adults, such as reduced walking speed, mobility, falls, fatigue, difficulties in performing daily activities, memory-related and social isolation issues. In turn, there is a need for continuous supervision, intervention, assistance, and care for elderly people for active and healthy aging. This research proposes an ambient assisted living system with the Internet of Medical Things that leverages deep learning techniques to monitor and evaluate the elderly activities and vital signs for clinical decision support. The novelty of the proposed approach is that bidirectional Gated Recurrent Unit, and Gated Recurrent Unit deep learning techniques with mutual information-based feature selection technique is applied to select robust features to identify the target activities and abnormalities. Experiments were conducted on two datasets (the recorded Ambient Assisted Living data and MHealth benchmark data) with bidirectional Gated Recurrent Unit, and Gated Recurrent Unit deep learning techniques and compared with other state of art techniques. Different evaluation metrics were used to assess the performance, findings reveal that bidirectional Gated Recurrent Unit deep learning techniques outperform other state of art approaches with an accuracy of 98.14% for Ambient Assisted Living data, and 99.26% for MHealth data using the proposed approach.
Introduction
The world is confronting a seismic demographic change-Aging population is increasing at an unprecedented rate in every country. It is estimated that the elderly population over 60 years of age is anticipated to increase to 10 billion people by 2050, compared to 7.7 billion as of today [35]. Inactive population growth including the elderly population and disabled patients in Europe, United Kingdom, United States, and all the OECD (Organization for Economic Co-operation and Development) and non-OECD countries (shown in Fig. 1) is one of the great issues [27]. Despite improvements in healthcare, most older adults who live alone suffer from chronic obstructive pulmonary diseases such as dementia, diabetes, depression, and other age-related diseases such as osteoarthritis, cataracts, hearing loss, neck, and back pain, and need assistance in activities of daily living. As a consequence of which, the activities of these individuals need frequent monitoring and medical care. There is also a high risk of sudden falls and cardiac attacks of elderly people who need long-term health care [14]. This will pose a major socio-economic burden and will result in significant challenges to healthcare and society. It is necessary to address age-related challenges and provide solutions and develop low-cost, robust, safe, and usable healthcare systems to support the elderly in their daily lives to reduce the burden of society. A healthy society must be created for healthy aging. More support is required to help elderly people to ensure they can continue to thrive as an individual and live independently through programs and products which emphasize mobility, fitness, and safety. Ambient Assisted Living (AAL) is one of the effective approaches for assisting the elderly to live independently and longer using information and communications technology (ICT). AAL refers to improving the quality of life of elderly people or those with disabilities. An “intelligent” ubiquitous wireless network of wearable sensors, Internet of Things, medical devices, Artificial intelligence techniques, patients, healthcare specialists, and caregivers is created, which can be adapted according to the needs of the users in any situation specifically and proactively [29]. The AAL systems are designed to enable people in need of care and elderly people to stay in their own homes independently, for as long as possible through remote monitoring from healthcare specialists and caregivers. AAL is a multidisciplinary field that utilizes information technologies in daily living to reduce treatment costs, aiming to develop computing applications that ease the way of providing healthcare for the elderly population to aid collaboration between doctors, families, and patients [29,30].

Elderly people population growth by 2060 [27].
Two major factors, which contribute significantly to disease prevention and management, are receiving regular care and performing daily life activities. Various preventative care assessments and daily activity can now be objectively measured in people’s home environments using remote monitoring. Real-time information about one’s physical movement activities and vital information can be recorded in real-time using sensors. One of the significant components in AAL is the use of sensors through the Internet of Medical Things (IoMT) for real-time monitoring of ongoing motion activities and the vital psychological conditions of the individuals for early diagnosis [36]. IoMT allows physicians to remotely monitor patients and enables the transmission of medical data over a secure network.
Artificial intelligence and machine learning techniques have the capability for predictive modeling and improving diagnostics and decision-making to transform healthcare services. Artificial intelligence techniques have been used in an increasing number of healthcare applications in recent years, due to the advent of deep learning methodologies. Deep learning is a category of machine learning technique that facilitates the doctors in better decision making to analyze the disease with accurate precision and provide better treatment [12]. Deep learning approaches offer medical professional’s insights into the early diagnosis of the disease to ensure that patient care is more personalized and appropriate.
Synergizing the benefits of smart sensors and deep learning techniques, an Ambient Assisted Living framework is proposed for remote health monitoring and daily activities of elderly home-alone people. AAL is an ongoing research topic with the aim to aid the development of assistive technology to improve the well-being of the elderly, the disabled, and chronically ill patients. The main contribution of this work is that an integrated intelligent Ambient Assisted Living system is proposed that utilizes smart sensors, IoMT, and deep learning techniques to monitor the health and daily activities of elderly people. The novelty of the proposed approach is that advanced deep learning techniques namely Bidirectional Gated Recurrent Unit (BiGRU) and Gated Recurrent Unit (GRU) are utilized for the detection of daily activities. Furthermore, the proposed system detects inactive activities, which aids in early clinical decision-making in case of emergencies. Moreover, it provides quick emergency services, preventive care for patients at risk, effective delivery of care, avoids overcrowding at hospitals, reduces cost, monitors, collaborates, communicates, and shares vital information with expert physicians through remote healthcare services.
This paper is organized as follows: Section 2 discusses the latest relevant related work to monitor elderly activities. Section 3 describes proposed methods used in this research study particularly on mutual information feature selection, deep learning techniques, IoMT, and smart sensors. Section 4 presents the proposed AAL framework using IoMT and deep learning techniques for remote monitoring of elderly and home-alone people. Section 5 presents the effectiveness of the proposed approach experimentally with performance assessment and classification results, while Section 6 derives a conclusion from the proposed study.
A review of relevant related work on remote monitoring the activities of daily life based on user context through the smart sensor and machine learning techniques is discussed as follows:
Ambient assisted living for elderly activities monitoring
Several non-invasive and low-cost activity monitoring systems are reviewed focusing on sensors used in a wearable platform [11,19]. A mobile smart environment with embedded smartphone sensors as AAL method was proposed to identify ongoing elderly activities and their context through a layered architecture consisting of a context manager, context reasoner, and service controller [9]. A mobile tri-axial accelerometer sensor-based publicly available heterogeneity human activity recognition (HHAR) dataset was used for activity recognition, Random Forest machine learning algorithm was employed to train the model and to predict the activities. Further, ontology and rule-based models were also exploited to provide appropriate services to the elderly based on their psychological profile and current activities. A context-aware sensor system (CARE) is presented for nurses in nursing homes through an Android tablet application that has utilized sensors to improve elderly residents’ care service [16]. Keeping in view the serious consequences of fall and fall-related injuries, a private real-time and context-aware fall detection system is proposed for elderly people that consists of a smart carpet with a sensor pad placed under a carpet to detect falls and alert health care personnel [21]. A fall detection system based on smart textiles and a non-linear SVM was proposed to categorize fall orientations into 11 categories, including moving upstairs, running, falling forward/backward, falling right/left, and so on [20]. A personalized system based on an all-in-one health monitoring device to monitor the health of old aged people is presented to provide computer-aided decision support to health practitioners [37]. Data of eleven elderly was collected by monitoring their activities and vital signs were focused to measure by Sony wellness tracker. Machine learning techniques were used to predict the health and wellness condition of the elderly one day ahead. An AAL system based on automated feature engineering for activity recognition was proposed where best features were selected from different sensors and different classification models were trained and evaluated [38]. A cloud based IoMT platform as a multi-layered architecture was proposed to sense and collect patients’ information of their vitals and surrounding environment for AAL [26]. With the objective of “aging well at home,” an IoT-based smart home automation-enabled health monitoring and the assistive system was proposed to assist in caring for sick and elderly persons around the clock [3]. A non-invasive ambient intelligence for older people was presented to deal with noisy patterns on the data collected by wireless multiple sensors installed in subjects’ rooms [1]. Random forest machine learning techniques were adapted to aid in the monitoring of patterns of regular behavior, such as occupancy or ventilation.
Remote health monitoring
An edge computing-based fall detection framework was proposed for real-time patient monitoring and analysis [33]. Wearable sensors called MetaMotionR from MbientLab, an open-source streaming engine named Apache Flink was used for streaming of the data, and a long short-term memory network (LSTM) model was applied for fall classification.Notifications were generated in real-time to enable calls for assistance. A public dataset called “MobiAct” [2] was used to train the model and 95.8% accuracy was reported for detecting falls by performing real-time streaming data analytics. To prevent chronic diseases, a remote health monitoring system for elderly people was proposed to track a person’s pulse, and blood oxygen through wearable sensors [6]. A wearable sensor-based scalable system integrated with IoT in terms of Arduino and Raspberry Pi was presented for remote management of chronic conditions [23]. For rural telemedicine, a tablet PC-enabled body sensor system was proposed with the use of a body sensor device where physiological parameters were continually collected [15], alert messages were sent to the healthcare staff in real-time after automatically identifying the abnormal conditions of the patients. In another approach, a health monitoring system with RFID sensors was used to tag objects with hand movements and wireless accelerometers to classify human body states for recognizing users’ activities in their daily living [13].
Table 1 provides a detailed Comparison of various approaches of the related work. It was observed from Table 1 that only in [1] advanced deep learning technique LSTM has been utilized for the remote monitoring of elderly people’s wellbeing. Hence there is a need for more investigations to be carried out on using advanced deep learning techniques to analyze and process this huge amount of data from healthcare devices to remotely monitor elderly people. The proposed approach utilizes mutual information based feature selection along with BiGRU and GRU deep learning techniques for data analysis and prediction. The uniqueness of the proposed approach is that it incorporates both data analysis and a user-friendly interface to assist elderly people in their everyday activities while also transferring their health status to clinicians to aid in clinical decision-making.
Related work
Related work
This section provides a detailed discussion about the adapted methods in this research, including feature selection using mutual information, GRU deep learning technique for advanced data analytics, IoMT for transmission of acquired data, and smart sensors for extracting the daily activities and health vital information of the elderly people.
Mutual information-based feature selection
One of the most crucial steps in the building of machine learning models is feature selection, where an appropriate number of relevant features from the raw data is extracted. The presence of too many input features increases the model’s complexity, lowers overall accuracy, reduces generalization capability, and can result in a neural network with more connection weights than required, making the training process more difficult [7]. The goal is to obtain the best feature subset that is more capable of determining the desired output class. One theory of feature selection is based on mutual information. In this study, we consider the mutual information (MI) feature selection technique to evaluate each feature’s “information content” with the output class. Mutual Information is based on the concept of information gain [8]. It measures how much information provided by feature F contributes to making an accurate classification decision on the target class C. The uncertainty of the features is considered by determining the entropy of the distribution. The entropy is calculated as follows:
Activity recognition through deep learning techniques
Deep learning is a machine learning technique that uses many layers of representation with simple and nonlinear modules that successively transform the representation from one level to a higher abstract level [17]. In this research, sophisticated deep learning techniques such as BiGRU and GRU were employed to predict user context-based activities.
Gated recurrent unit (GRU) and bidirectional GRU
In machine learning, the problem of vanishing gradient arises when the gradient turns vanishingly small, which avoids the weight from adjusting its value. Cho et al. [10] suggested a distinct type of deep learning model called Gated Recurrent Unit(GRU) to deal with the vanishing and explosion of gradients when learning long-term dependencies in traditional recurrent neural networks (RNNs). The GRU architecture (Fig. 2) has only two gating layers: update, reset gate, and an activation unit as shown in Fig. 3. Equation (1) to equation (4) represents the processing of the GRU Mathematically.

GRU architecture for activities detection.

GRU memory unit.
Reset Gate: This gate decides how much information to be forgotten from the previous moment. It tells the model to forget the irrelevant data and move forward without it. It is computed as illustrated in equation (4).
Update Gate: At this gate, the neural network determines how much input sensor data from the previous moment will be passed forward into the current hidden state. It is computed as shown in equation (5).
The content of the memory at time step T is given by the equation (6):
The final output of the GRU cell is computed as illustrated in equation (7)
The reset gate acts on
A bidirectional GRU neural network is a two-layer GRU neural network that can traverse in both directions. The output layer of a two-layer structure receives all of the contextual information from the input layer at any specific time. The basic idea behind the Bi-GRU neural network is that input sensor data is routed through a forward GRU neural network and a backward GRU neural network, with the forward and backward GRU outputs coupled to the same output layer. Figure 4 depicts the BiGRU neural network’s two-layer structure, which is used in this research.

Bidirectional GRU architecture.
IoMT is a connected infrastructure of medical devices, software applications, and services connected to health care providers through the Internet gateways (Fig. 5). Healthcare data from these devices is collected, transmitted, analyzed, and processed as these devices are connected to the cloud [18]. Rapid miniaturization and advancement in wireless technology have led to the development of implantable wearable sensors. These sensors are less obtrusive and more comfortable for real-time monitoring of several vital information such as body temperature, respiration rate, blood pressure, heart rate, electrocardiogram (ECG), arterial oxygen saturation (SpO2), movement, and ongoing activities by placing them on different parts of the body. These wearable sensors are embedded in smartphones, smartwatches, contact lenses, clothing or textile, and wristbands offering real-time data for physicians for faster analysis and decision making, associated with modern information and communication technology. IoMT offers numerous benefits to health care [18]. The benefits of IoMT will therefore include: (i) Remote monitoring of infectious and chronic diseases. (ii) Effective treatment and diagnosis. (iii) Patients’ conditions can be constantly monitored and can have instant access to the patient’s medical history. (iv) Easy and fast notification about the problems and automatic reminders. (v) Provide remote medical care by early detection of the risks for improved safety. (vi) Automatic transmission and analysis of data extracted from wearable sensors and devices. (vii) Advanced and accurate algorithms that can detect abnormalities. (viii) Patients suffering from dementia, Alzheimer’s disease can be easily located and tracked. (ix) Medical consultations remotely through telehealth, and telemedicine.

IoMT for health monitoring.
Smartphones Smartphones have turned out to be significant tools for laboratory or clinical settings in the IoT ecosystem. Smartphones have various inbuilt sensors such as accelerometers, gyroscopes, magnetometers, GPS, temperature, and barometers.
Accelerometer sensor For monitoring daily activities, accelerometer sensors are preferred which measure the accelerations of the objects and detect the orientation and vibration of the device along the reference’s axes. Figure 6 shows the acceleration axes on the smartphone, and this data is represented mainly for the accelerometer in a set of vectors:

Smartphone sensors for activity tracking.
Gyroscope sensor It delivers orientation direction and information like left/right and up/down with greater accuracy, it measures rotation and movement of the ongoing activities [24].
Magnetometer sensor Smartphones fitted with a magnetometer can sense magnetic fields that are typically known as a compass [24].
The data obtained from the accelerometer, magnetometer, and gyroscope sensors will be used for tracking the motion, posture, activity, and fall detection.
The emphasis behind the proposed approach is to continuously monitor the current activities and vital information of users with AAL technologies in a ubiquitous environment and provide the elderly and home-alone people with quick emergency services on detection of abnormalities through machine learning techniques from the incoming sensor data. Figure 7 illustrates the proposed context aware Ambient Assisted Living framework for remote monitoring of the daily activities and health status of the elderly which consists of three layers- sensing layer, data processing with machine learning layer, and visualization layer.

Elderly activities monitoring AAL framework with IoMT and deep learning techniques.
Sensing Layer with IoMT: To validate the proposed framework, a case study is performed on five elderly people for remotely monitoring their daily activities and health status. Data was collected through sensors embedded in the smartphones through the Phyphox tool [31] placed in the pocket. The variation in the heart rate was measured through smartwatch sensors worn on the wrist. Data collected from the smart sensors is transferred via the Internet of Medical Things (IoMT) to the data processing layer for storage and analysis. IoMT allows machine-to-machine communication through near-field communication technology or Wi-Fi, which are equipped with medical devices [36]. With digital solutions, IoMT allows medical devices to collect, transfer, and communicate data across the internet to be processed on the cloud [34]. During the transmission of the healthcare data from the IoMT devices, HIPPA compliances [28,32] are considered for the secure transfer of healthcare data to preserve the privacy and confidentiality of the healthcare data.
Data Processing with Deep Learning Layer: This layer includes data analysis, preprocessing, feature extraction, and classification. The collected data from the smart sensors is split into training and test set. During the acquisition of the sensor data, it may result in noisy signals. Data preprocessing is performed to eliminate redundant information found in the data, such as noisy signals, and removal of erroneous data, hence data cleaning is an important step and needs to be performed. The next step is feature extraction, where an appropriate number of relevant features are extracted from the preprocessed data. In this research study, the mutual information-based feature selection technique discussed in Section 3.1 is adapted to select the k-best features to build the machine learning model. Further, the extracted features are trained through GRU and BiGRU advanced deep learning classifiers, and comparison is performed with baseline models such as SVM, Naive Bayes, and decision trees machine learning techniques. The classifier works using the training data set to understand how the given input features apply to predict the elderly activities for the target class. So, after being properly and correctly trained, the classifier was tested to recognize the activities for the new input sensor data. The proposed technique was able to accurately detect all the activities performed with the elderly people with an accuracy of 98% on the recorded ALL data and with 99% accuracy on MHealth data. Other biomarkers such as variations in the heart rate were also continuously monitored for immediate intervention for proactive treatment to prevent unexpected breakdowns such as sudden variations in the heart rate, inactive activities, and sudden falls. To provide better elderly care with sensors and connected devices healthcare specialists can restructure their workflow management and clinical operations from remote locations through AAL and IoMT technologies.
Visualization Layer: Visualization is a vital necessity for remote health monitoring systems, as it is unrealistic for physicians to analyze the huge volume of data generated from the wearable sensors. Data analysis and visualization methods display the data from the wearable sensors in an easy-to-use and in readable form to help the physicians in remote monitoring of the elderly people and for accurate clinical decision making in case of emergencies. This layer provides a user-friendly interface for faster clinical decision making on the prediction of abnormalities from the deep learning models, the generated results are sent to the physicians through a user-friendly interface. It consists of a healthcare interface and a patient’s or caregiver’s interface. Through the healthcare interface, remote physicians can monitor the elderly profile and the ongoing elderly activities, shown in Fig. 8. The generated results from the model for the ongoing activities along with heart rate recorded from the wearable sensors are sent to the remote physicians for immediate intervention in case of emergencies such as inactive activities, fall detection, and variability in heart rate. The second interface is the patients or caregiver interface- Through this interface, notification alerts are sent to the caregivers in case of emergencies, shown in Fig. 9. Alert messages are sent to the patients and caregivers as risk, normal, and moderate through user-friendly interfaces. Remote monitoring of the elderly activities is performed continuously for assisted living. If there is no movement or physical activities or sudden falls, a risk notification message is sent to the caregivers to consult the doctor immediately (Figure 9(b)). If there are moderate to no physical activities from the past two days, a notification message such as no activities from the past two days is sent to the elderly person (Figure 9(c)). If all the daily activities, heart rate, and other biomarkers are correct, stay fit and a health message is sent to the elderly person (Figure 9(d)).

Physician interface.

Patient interface.
In this section, the proposed technique for elderly activity recognition for AAL is evaluated in experiments over the recorded AAL dataset and MHealth benchmark dataset [5]. Leveraging the benefits of smart sensors and deep learning techniques, experiments were performed with GRU and BiGRU deep learning techniques and compared with SVM, Naive Bayes,Decision Trees and with machine learning techniques proposed by other researchers [1,3,6,23]. This experimentation aims to produce an efficient model capable of effectively detecting the daily activities of elderly people to continuously monitor their wellbeing. The performance of the model is evaluated using the overall accuracy, activities-wise accuracy, confusion matrix, precision, recall, and F-score metrics. The proposed technique is extensively compared with existing approaches for activity recognition for all these metrics. The experiments were carried out on google collab GPU with Python, Keras, and ‘Tensorflow’ deep learning toolboxes were utilized for mutual information feature selection and implementation of the GRU and BiGRU classifiers, respectively.
Dataset used in the experimentation
Experiments were performed on the recorded AAL dataset and MHealth dataset. The AAL dataset was collected from five elderly people (two females and three males) aged 55 to 65 years old while performing six daily activities (standing, walking, sitting, lying down, climbing stairs, getting downstairs) for three days through accelerometer, gyroscope, and magnetometer sensors embedded in the smartphone utilizing the Phypox tool [31]. The activities (standing, sitting, lying down) were recorded for 60 seconds at a frequency of 20 Hz, whereas the activities (walking, climbing stairs, and getting downstairs) were recorded for 90 seconds at a frequency of 20 Hz because the elderly require more time to climb stairs, get downstairs, and walk slowly. The inactive condition was subsequently recorded at the same frequency of 20 Hz for 60 to 90 seconds. The heart rate was measured using the smartwatch sensors. MHealth dataset [5] consists of ECG sensor recordings for heart rate variation data and 12 daily activities (standing still, sitting and relaxing, lying down, walking, climbing stairs, waist bends forward, frontal elevation of arms, knees bending, cycling, jogging, running, jump front and back). The MHealth data was recorded with an accelerometer, gyroscope, and magnetometer sensors positioned on the left ankle, right wrist, and chest for 10 subjects to monitor the movement experienced by different body parts while performing daily activities. Two ECG sensors were positioned on the chest to record the heart rate [4,22]. MHealth dataset consists of 344,116 samples of input data from sensors, whereas the recorded AAL dataset consists of 155,406 samples of data from smart sensors. Table 2 describes the two datasets used in this study. 70 percent of the dataset is used for model training and 30 percent is utilized for model testing.
Sensor data
Sensor data
In certain situations, due to internet problems or low smartphone batteries, the sensor signal does not match the daily physical activities, such signals were recorded with null values and considered to be noisy. Null values were removed as they are noisy sensor recordings, and it degrades the performance of the machine learning algorithms. Further, the data was normalized using the standard scalar technique to scale the features between mean zero and standard deviation of 1. Table 3 presents the normalization of features on AAL data, it can be observed that all the four features have a mean close to zero and the standard deviation is close to 1, all the features have been scaled and have been adjusted.
Normalization using standard scalar
Normalization using standard scalar
Each row of the AAL dataset consists of 10 features of the sensor recordings for the six daily activities carried out by the five-elderly people, from the 10 features, four best features with larger scores were selected using mutual information-based feature selection technique (discussed in Section 3.1). The MHealth dataset consists of 23 features for 12 activities performed by 10 subjects. Out of the 23 features, 13 best features were selected using the mutual information technique with a higher score. The features that are highly correlated with the target class to predict are selected, whereas the less correlated features are discarded with the mutual information feature selection technique [22]. A threshold of 70% was fixed, hence features with a lower score below 70% were discarded from both the datasets as they do not contribute much in identifying the target class. The goal is to obtain the best feature subset that is more capable of determining the desired output class.
The dataset was trained using the GRU and BiGRU model that was built using GRU layers which consists of two gates reset and update gate (discussed in Section 3.2). The GRU layer reads the input sensor data and passes the results to the fully connected layer. A dropout layer of 0.5 is added to decrease the overfitting issue. The output from the last dropout layer is passed to the fully connected layer with the activation function. The model is trained for 20 epochs, it was optimized using adam optimizer and categorical cross-entropy to produce the classification results for the learned sensor data, each input from the sensor data is mapped to an activity. Experiments were also performed on baseline models such as SVM, Burnolie Naive Bayes, and Decision Trees.The SVM model is implemented using a linear Support Vector classifier with a kernel parameter of 0.1. The Naive Bayes model was implemented using Bernoulli Naive Bayes. The Decision trees model was implemented considering entropy as the criterion with a maximum depth of the decision trees to 5. The sequence of steps followed in the implementation is depicted in Fig. 10. The model performance results are presented in Table 4 and resultant validation accuracy and loss plots are presented in Fig. 11 and Fig. 12.

Flowchart for ambient assisted living activity recognition system.
Several experiments were performed on both AAL and MHealth datasets. Five evaluation metrics accuracy, activity-wise accuracy, precision, recall, and F1-score are used to assess the performance of the proposed GRU and BiGRU techniques. Table 4 presents the results obtained from the implementation of BiGRU, and GRU deep learning techniques and SVM, Naive Bayes, and Decision Trees machine learning techniques. From Table 4, it is evident that the performance of both BiGRU, and GRU deep learning models, is better than SVM, Naive Bayes, and Decision trees machine learning models in terms of accuracy, precision, recall, and F1-Score. The highest accuracy was achieved by BiGRU with 98.14% for the AAL data and 99.26% for MHealth data, followed by GRU with 97.28% for the AAL data, and 98.89% for MHealth data. We have calculated the precision, recall, and F1-measure scores for both datasets to assess the sensitivity and positive predictive value of the proposed technique, which are depicted in Table 4. A balanced precision and recall scores are achieved for both the datasets (recorded AAL data and MHealth data), indicating a fewer number of false negatives and true negatives using the proposed BiGRU and GRU technique. An F1-scores of 98%, and 99.18% is achieved for BiGRU with AAL data and MHealth data, followed by an F1-Score of 97.28%, and 98.84% is achieved for MHealth data using the proposed approach with GRU model, showing the effectiveness of deep learning techniques compared to SVM, Naïve Bayes and decision trees baseline techniques. Table 4 illustrates that, for all the five evaluation metrics-accuracy, precision, recall and F1-Score, BiGRU provides higher accuracy. BiGRU performance is incredibly effective in complex scenarios such as the recognition of activities for both of the datasets if carefully trained. The model removes the problem of the vanishing gradient, it preserves the relevant information at each time step for all daily activities performed by the elderly people and passes on to the next time steps. BiGRU and GRU perform better as they adopt iterative gradient descent techniques that adjust the weight at each time step to reduce the overall error in a set of training sequences and preserve long-term dependencies.
Results of the proposed technique for AAL for elderly activities recognition
Results of the proposed technique for AAL for elderly activities recognition

BiGRU & GRU accuracies plots for AAL data.

BiGRU & GRU loss plots for MHealth data.

Confusion matrix for AAL data using the proposed BiGRU technique.
Figure 11 and Fig. 12 illustrate the accuracy and loss curves for BiGRU and GRU deep learning models with the proposed approach. The BiGRU and GRU models started learning from the first epoch, the validation accuracy increased along with the training accuracy for the AAL data and attained an accuracy of 98.14%, and 97.28% for BiGRU and GRU models at 20 epochs. For MHEALTH data, an accuracy of 99.26% and 98.89% was achieved for BIGRU and GRU models with the proposed technique. For both the datasets, the highest accuracy was achieved by the BiGRU model with mutual information feature selection technique. The validation accuracy converges with training accuracy at 13 epochs for the BIGRU and GRU model with the proposed approach for the AAL data, whereas with MHealth data, BIGRU and GRU start converging at 15 epochs. This shows that the models generalize, and dropout functions help in avoiding overfitting and the learning rate has been properly chosen. Simultaneously, the validation loss i.e., Mean Absolute Error (MAE) starts reducing along with the training error and the distance between the training and validation reduces to 0.0014, The MAE rate for the AAL data reduces to 0.0493 with the BiGRU model and for the GRU models it is reduced to 0.0800. For MHealth data the MEA error rate(validation loss) for the BiGRU model is reduced to 0.0242 and for the GRU model the error rate is reduced to 0.0324. It was observed that the highest accuracy and lowest error rate(loss) was achieved for both datasets using the proposed approach people.This shows the efficacy of the BiGRU models with mutual information feature selection techniques.

Confusion matrix for MHealth data using the proposed BiGRU technique.
Figure 13 and Fig. 14 illustrates the obtained confusion matrices for the two datasets for the test sets. The overall accuracy with the proposed BiGRU techniques for the AAL data is 98.14% and 99.26% for MHealth data, respectively. The performance of each activity is assessed through activity-wise accuracy for each dataset, which is displayed in the confusion matrices in Fig. 13 and Fig. 14. All the activities have achieved an accuracy of 98% and above with minimum to no confusion between the activities, whereas the classifier confuses a bit for activities such as standing, climbing upstairs, and getting downstairs and achieved an accuracy of 97%, using the proposed BiGRU technique for the AAL data. For the MHealth dataset, the model accurately detects most of the activities such as standing still, sitting and relaxing, lying down, walking, climbing stairs, waist bends forward, frontal elevation of arms, knees bending(crouching), and cycling with minimum to no confusion whereas the classifier confuses a bit with activities – jogging, running and jump front&back and achieves 98%, 97%, and 96% accuracy respectively. The classifier accurately predicts all the activities with minimum to no confusion for both AAL and MHealth dataset and hence can be considered as an optimal classifier for detection of daily activities for elderly care and assisted living. The proposed BiGRU and GRU deep learning models outperform other standard models in terms of accuracy, activity-wise accuracy, precision, recall, and F1-Score. This proves the efficacy of the proposed approach and can be confidently adapted to monitor the daily activities and wellness of elderly people through smart sensors in real-time.
Due to advances in technology, nowadays various smart devices with embedded sensors are available in the market to monitor health and fitness. To maximize the potential benefits of the smart sensors for health monitoring and management, one of the critical tasks is how to effectively analyze and use the data is a challenging task. The latest advances in IoMT have facilitated the researchers to investigate machine learning, and deep learning techniques to remotely monitor and diagnose various diseases of the patients. An AAL framework to remotely monitor the elderly and home alone people is proposed in this study by making use of sensors, IoMT, and deep learning algorithms to monitor health statuses such as ongoing activities and heart rate variation of home alone and elderly people. The proposed system collects data from various sensors and transfers it to the cloud server for further analysis and processing, mutual information-based feature selection technique to select significant features that contribute to identifying the target class is applied, further BiGRU and GRU deep learning techniques are governed to process it to classify the ongoing activities of the subject and their vital signs. The performance of the models is assessed using various metrics on the recorded AAL and MHealth. The proposed approach with BiGRU and GRU achieved promising performance and BIGRU achieved the highest accuracy of 98.14% and 99.26% for the recorded AAL data and MHealth data. The proposed system can be confidently used by healthcare workers to remotely monitor the health status of the elderly and home-alone people in real-time. The proposed AAL system will be highly beneficial during crucial situations such as the pandemics to remotely the patients and their health status.
Conflict of interest
The authors have no conflict of interest to report.
