Next Article in Journal
Prediction of Ultimate Bearing Capacity of Soil–Cement Mixed Pile Composite Foundation Using SA-IRMO-BPNN Model
Next Article in Special Issue
Static High-Quality Development Efficiency and Its Dynamic Changes for China: A Non-Radial Directional Distance Function and a Metafrontier Non-Radial Malmquist Model
Previous Article in Journal
Multi-Model Assessing and Visualizing Consistency and Compatibility of Experts in Group Decision-Making
Previous Article in Special Issue
A Double-Layer Coupled Network Model of Network Density Effects on Multi-Stage Innovation Efficiency Dynamics: Agent-Based Modeling Methods
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Study on Caregiver Activity Recognition for the Elderly at Home Based on the XGBoost Model

1
School of Economics and Management, Beijing University of Chemical Technology, Beijing 100029, China
2
Journal Center, China Electric Power Research Institute, Beijing 100192, China
*
Author to whom correspondence should be addressed.
Mathematics 2024, 12(11), 1700; https://doi.org/10.3390/math12111700
Submission received: 26 April 2024 / Revised: 25 May 2024 / Accepted: 27 May 2024 / Published: 30 May 2024

Abstract

:
This paper aims to discuss the implementation of data analysis and information management for elderly nursing care from a data-driven perspective. It addresses the current challenges of in-home caregivers, providing a basis for decision making in analyzing nursing service content and evaluating job performance. The characteristics of caregivers’ activities were analyzed during the design of a wearable device-wearing scheme and a sensor data collection system. XGBoost, SVM, and Random Forest models were used in the experiments, with the Cuckoo search algorithm employed to optimize the XGBoost model parameters. Based on the control group experiment, it was confirmed that the XGBoost model, after adjusting the parameters using the Cuckoo search algorithm, exhibited better recognition performance than the SVM and RandomForest models, and the accuracy reached 0.9438. Wearable devices present high recognition accuracy in caregiver activity recognition research, which greatly improves the inspection of caregivers’ work and further promotes the completion of services. This study actively explores the applications of information technology and artificial intelligence theory to address practical problems and effectively promote the digitalization and intelligent development of the elderly nursing care industry.

1. Introduction

1.1. Background

Human life expectancy has increased at an unprecedented rate, while the human fertility rate has declined rapidly in many countries around the world [1]. With the change in population structure, many countries are entering or will enter an aging society, such as China and Japan [2,3]. According to the data of the Ministry of Civil Affairs of the PRC, in the past decade, the size of the aging population in China has presented a continuously growing trend, exceeding 280 million, as shown in Figure 1. How to provide professional elderly nursing care services for elderly people has become an urgent and important issue. The first concern is where elderly people enjoy elderly nursing care services; do they stay at home or live in a professional elderly nursing care institution? In China, people become increasingly reluctant to leave their homes as they age. Therefore, home-based care has become an increasingly popular choice due to its advantages of humanization, flexibility, and lower private and social costs. Additionally, home-based care-taking is supported by the government and elderly nursing care agencies in certain places [4].
One of the significant challenges in home-based caregiving involves managing and assessing the performance of nursing staff. Their work is evaluated primarily from two perspectives: adherence to the scheduled care plan and the quality of care provided. The foremost concern is verifying the implementation of prescribed nursing services.
Nursing activity recognition via image and video recognition is a possible solution. However, this is often not feasible in many cases because of privacy issues as videos violate the privacy of elderly people and staff [5]. In addition, the high cost of purchasing, deploying, and maintaining an image- and video-capturing device and the expensive and time-consuming video analysis are also weaknesses. On the other hand, with the development of the internet [6], various types of sensors are widely used in wearable devices. Compared with video and image-based behavior recognition methods, sensor-based behavior recognition methods are characterized by low cost, strong flexibility, and good portability. Therefore, human behavior recognition based on wearable sensors has become a research hotspot in human activity recognition (HAR), which greatly promotes the standard-setting and information management of the elderly nursing care market.

1.2. Difficulties with the Recognition of Caregivers’ Activities

The current research on Caregiver Activity Recognition (CAR) for the elderly at home lacks a standardized wearable device-wearing scheme and public dataset. As a result, this research encounters several challenges:
(1)
The primary challenge is designing a suitable wearable device-wearing scheme for studying CAR. Additionally, extracting effective features and accurately distinguishing between different behavioral activities are ongoing difficulties and areas of focus in current research.
(2)
Traditional static models struggle to recognize behavioral activities due to variations among individuals, which leads to lower accuracy in recognition outcomes.
(3)
Real-world nursing care activities pose another challenge as they often involve complex actions. These actions can easily be confused with one another, making accurate recognition a difficult task.

2. Literature Review

The concept of activity recognition originated in the late 1990s [7,8], particularly utilizing wearable sensor data for sports and motion behavior analysis [9,10,11]. This field has gained significant importance, especially in the domains of medicine, military, and security applications. For instance, exercise therapy can reduce symptom burden in advanced cancer patients [12]. Additionally, robots have been employed in certain studies to directly facilitate activity recognition, such as utilizing them for gait training and other rehabilitation exercises aimed at patients with ambulatory impairments [13]. Furthermore, bionic robots are also utilized in various research endeavors [14,15]. Therefore, the ability to recognize activities such as walking, running, or cycling has been proven to be very valuable in providing caregivers with information on patient behavior. However, there is a lack of research on using wearable sensor data analysis to identify caregiver behavior, which is the main focus of this paper.
In general, different sets of activities can result in entirely distinct HAR problems. Consequently, the design of any HAR system should be tailored to the specific activities that need to be recognized. A literature survey has identified seven distinct classes of activities, with detailed summaries of both group and individual activities falling under each class [16].
Human Activity Recognition (HAR) has employed a variety of machine learning (ML) algorithms. In ML, there are three types of learning: supervised learning, unsupervised learning, and semi-supervised learning [17]. To determine the optimal method for different case studies, it is necessary to compare the experimental results of each method. Generally, ensemble learning algorithms outperform single learners (such as decision trees) in terms of performance. For example, the Random Forest Classifier [18,19] is constructed by combining multiple decision trees and classifies unknown samples by voting. It utilizes coverage optimization to integrate the capabilities of multiple weak classifiers, resulting in improved overall performance compared to a single algorithm [20].
Furthermore, deep learning models are employed for human activity recognition (HAR). Research has indicated that in cases where HAR data are multidimensional, and activities are more complex, a deep neural network (DNN) with additional hidden layers can facilitate better training of the model [21,22,23]. Convolutional neural networks (CNNs) exhibit two advantages over other models when applied to time series classification: local dependence and scale invariance [24,25]. Due to factors such as learning speed and resource consumption, recurrent neural networks (RNNs) are less commonly used for HAR tasks [26,27,28]. Moreover, a combination of different deep models is utilized for HAR tasks [11,29,30].
Although XGBoost (version: 2.0.3) [31], introduced in 2014, offers efficiency and time-saving advantages, but its utilization in behavior recognition is currently limited compared to well-established algorithms. Furthermore, there is a lack of extensive research specifically focused on behavior recognition using XGBoost, especially in the context of elderly behavior recognition.
To address these gaps, this paper aims to conduct research on home-based elderly nursing care behavior utilizing the XGBoost model. By investigating the capabilities of XGBoost in accurately recognizing and understanding the behaviors of home-based staff, this study aims to contribute to the existing research in this field. The objective is to explore the untapped potential of XGBoost in behavior recognition, particularly within the domain of home-based elderly nursing care.
Through this research, we seek to shed light on the benefits and practical applications of the XGBoost model in improving behavior recognition outcomes in elderly nursing care settings. The findings of this study can serve as inspiration for further research and encourage the wider adoption of XGBoost as a valuable tool for promoting the completion of care provided to elderly individuals in home-based settings. The evaluation of the quality of nursing behavior has not yet been considered in this article, which is also a very important issue and can serve as an unresolved study for the future.
The main contributions of our work include the following aspects:
(1)
This study developed an experimental system utilizing wearable devices for data collection to identify nursing behaviors, addressing the limitations of previous research in this area.
(2)
Following feature importance analysis and feature reduction, three machine learning algorithms (SVM, RandomForest, and XGBOOST) were employed in this study. The XGBOOST model was further optimized using the cuckoo search algorithm to achieve the highest recognition accuracy of 0.9438. Additional experiments were conducted to verify the impact of behavioral constraints on recognition performance.
(3)
By accurately identifying elderly nursing care activities, this study enables effective monitoring of the completion of tasks by nursing staff.

3. Research Framework

After consulting with elderly nursing care service providers and enterprises about which caregivers’ activities are necessary to be recognized as management objects, and also analyzing which nursing activities are feasible to recognize technically, this paper selects nine nursing care activities as research objects of CAR as shown in Table 1.

3.1. Experimental System

We have designed a wearable data collection system consisting of three devices: a wearable vest and two wristwatches. The “Hitoe” wearable vest is equipped with sensors that enable the collection of physiological data, including body movements and postures. Additionally, we use wristwatches called “TicWatch” on both wrists to capture the movements and postures of the arms (as shown in Figure 2).
Via the utilization of sensor data collected from these three wearable devices, it becomes feasible to reconstruct the vast majority of action patterns related to caregivers’ activities. To achieve this, the devices are connected to a smartphone via Bluetooth, which subsequently establishes a connection to a mobile workstation or PC through Wi-Fi. In this setup, a dedicated database is implemented to store and manage the collected data.

3.2. Data Collection

The data used in this article come from volunteers wearing wearable devices, and the experiment was conducted with the permission of the volunteers. Thirty-six caregivers from five public nursing homes in Beijing wore wearable devices to perform caregivers’ behaviors, a total of nine caregivers’ behaviors, each lasting either 180 or 300 s depending on the characteristics of each behavior (e.g., wiping a desk takes less time than moving objects), and the criteria for selecting the personnel included volunteering to join this experiment and working in a nursing home for more than one year, 4 men and 32 women, with an average age of 46.5 years. The devices worn by the caregivers included a smart undershirt (Hitoe, from Nippon Telegraph & Telephone, Tokyo, Japan) for recognizing a person’s upper body posture and two smartwatches (TicWatch1 and TicWatch2, from FUXIANG, Shanghai, China) for recognizing hand movements.
All the data were collected by volunteers in their daily work. Our dataset consists of A, B, A’, and B’, and over 87,000 sensor data samples were collected using wearable devices Hitoe, TicWatch1, and TicWatch2. Each data sample consists of 27 features (as indicated in Table 2) along with a classification (S1, …, S9) composition. The interval between consecutive data samples is 200 ms. A’ and B’ require volunteers to complete corresponding nursing services according to certain norms, while A and B allow volunteers to complete nursing services based on their personal habits. For example, in A’ and B’, when performing “S1: Sweeping the floor,” the volunteers are instructed to hold the broom with both hands and sweep the floor from right to left. In subsequent experiments, we demonstrated that using A’ and B’ for nursing behavior recognition presents higher accuracy.

3.3. Recognition Solution

The CAR solution, as shown in Figure 3, is a comprehensive approach developed based on extensive research into state-of-the-art Human Activity Recognition (HAR) methods. It consists of five main components, each contributing to the effective recognition of caregivers’ activities.
(1)
Component I: Data Preprocessing
This component is responsible for converting unstructured raw data into structured data. It involves a data preprocessing process that organizes and formats the data in a manner suitable for subsequent analysis.
(2)
Component II: Feature Processing
In this component, the features extracted from the preprocessed data are further processed. This involves analyzing the importance of each feature and reducing the dimensionality of the feature space. Through these tasks, the component ensures that only relevant and significant features are considered for subsequent steps.
(3)
Component III: Classification
The classifiers include XGBoost, Support Vector Machine (SVM), and Random Forest. The collected data is then divided into two sets: training and testing datasets. The training data is used to learn patterns related to caregivers’ activities and build classification models. Conversely, the testing data is employed to assess the performance of the constructed models.
(4)
Component IV: Parameter tuning
This component is of utmost importance in optimizing the performance of classification models. It utilizes techniques to fine-tune the model’s parameters, thereby enhancing its ability to accurately recognize and classify caregivers’ activities.
(5)
Component V: Performance Evaluation
Various evaluation measures such as precision, recall, f1_score, and accuracy are employed to assess the performance of three specific models used in this study: the XGBoost model, the SVM model, and the Random Forest model. These measures provide insights into the effectiveness and reliability of the CAR solution.

3.4. Feature Importance Analysis

Sample data were collected, and each sample has a corresponding label (S1, S2, …, S9) indicating the nursing activity performed by the caregiver during data collection. Each sample includes data from three wearable devices, namely Hitoe, TicWatch_1, and TicWatch_2, which capture x-y-z axis sensor data. As shown in Table 2, the preprocessed dataset consists of 27 features.
Feature importance analysis is not used for feature reduction. The XGBoost model in Python provides a method for feature importance analysis, which can help us analyze the importance score of each feature and demonstrate which features contribute more to the model prediction. This provides a reference for subsequent research on feature selection. The method of feature dimensionality reduction in this article is Principal Component Analysis (PCA), and the basis for dimensionality reduction in PCA is interpretable variance [32]. The subsequent prediction research in this article will use the PCA dimensionality-reduced dataset as the training and testing sets.
As depicted in Figure 4, it is evident that the importance of the six feature values (t1_gyscp_x, t1_gyscp_y, t1_gyscp_z, t2_gyscp_x, t2_gyscp_y, t2_gyscp_z) in the feature set is relatively low. This implies that this specific type of data may have limited utility for nursing behavior recognition. Consequently, it could be considered to reduce the collection of this type of data in future data-gathering processes.
Moreover, notable disparities in feature importance can be observed between “t1” and “t2” for acceleration, linear acceleration, and gravity data types. This indicates that there are distinctions in the same data types collected from the caregiver’s left and right hands. Such differences could arise from variations in the division of labor or behavior between the left and right hands during nursing activities. The dominance of right-handedness in the majority of individuals in real-life situations results in enhanced performance during the execution of nine nursing behaviors, such as sweeping the floor, feeding, wiping a window, wiping a desk, etc. This is attributed to increased effort exerted by the right hand, expanded range of motion, and potential alterations in speed. Consequently, these distinctive characteristics enable differentiation between this particular nursing behavior and others. Thus, when collecting data from both hands, it is advisable to gather diverse types of data to attain improved recognition outcomes.
Similarly, there are substantial variations in the importance of features across the three axes, even for the same data type and the same hand. For instance, among the acceleration data (t1_acc_x, t1_acc_y, and t1_acc_z), on the same hand, the importance of the t1_acc_y feature is significantly lower compared to the other two features.

4. Materials and Methods

4.1. Introduction to XGBoost

XGBoost stands for “Extreme Gradient Boosting”, which is a high-precision integrated learning model based on Gradient Boosting Decision Tree (GBDT), whose essence lies in integrating multiple weak classifiers into a single strong classifier to improve the accuracy. In the context of regression prediction, each tree of XGBoost learns the residuals (negative gradients) of the sum of all previous tree results. By iteratively accumulating residuals with prior predictions, XGBoost continually approaches the actual values.
The XGBoost algorithm is an improved version of the GBDT algorithm and serves as an implementation of the gradient-down algorithm. The XGBoost model contains K CART trees, with its output being the sum of these K trees. The cumulative value serves as the predicted value of the XGBoost model and can be expressed mathematically as follows:
y ^ = k = 1 K f k x i
where K is the number of CART trees, f k denotes a specific CART tree, y ^ is the output of the XGBoost model. For a given sample length of n and the number of features of m , we have
D = x i , y i ( D = n , x i R m , y R )
where x i denotes the i -th sample input; y i denotes the output corresponding to the i -th sample input, F represents the space of CART trees, which can be expressed as
F = f x = w q x ( q : R m T , w R T )
where q represents the structure of the CART tree, T is the number of child nodes of the CART tree, w is the weight of the child nodes, and f(x) is the structure of the CART tree. The XGBoost model essentially constructs the CART tree through feature extraction to determine the structure and weight of the tree. Bringing the regularisation term into the objective function, we have
O b j = i l o s s y ^ i , y i + k Ω ( f k )
Ω f = γ T + 1 2 λ w 2
where y ^ i and y i represent the predicted and actual labeled values of the i -th sample, respectively. γ and λ are the weight coefficients. The O b j is the objective function, where the first half represents the loss error, typically measured using mean square error and logistic regression. The second half corresponds to the regularization term, commonly employed to limit the depth of the CART tree and reduce its complexity. By constraining the tree’s depth, it aims to prevent overfitting and improve generalization capabilities.
In summary, XGBoost offers the following advantages in performing regression prediction:
Improved Accuracy: By employing serial integration of decision tree models, XGBoost enhances the accuracy of output predictions. It exhibits a strong learning ability.
Model Complexity Control: XGBoost effectively manages the complexity of the model via regularization techniques. This helps to prevent overfitting and enhances the model’s generalization ability.
Enhanced Optimization: XGBoost expands the model by utilizing a second-order Taylor expansion of the loss function. This approach accelerates the optimization process, leading to faster and more efficient computations.

4.2. XGBoost Model Tuning

To optimize the XGBoost model, several hyperparameters need to be tuned. Out of all the options available, four hyperparameters stand out as the most important and frequently utilized:
The learning rate, denoted by η , is a hyperparameter that scales the contribution of each tree added to the model. It helps in maintaining the stability and adaptability of the model. A lower value of η (0 < η < 1) makes the model more conservative towards overfitting but also leads to slower computation.
The minimum loss threshold, denoted by θ , is a hyperparameter that determines whether features should be split or not based on the Information Gain of the weak learner. If the Information Gain exceeds θ , the features are divided; otherwise, they are not. Increasing the value of θ makes the algorithm more conservative in its splitting decisions.
The maximum depth, denoted by m , represents the level of complexity in constructing the tree structure model. A higher value of m allows the model to capture more intricate patterns and relationships in the data, potentially leading to overfitting. On the other hand, a lower value of m constrains the tree’s depth, making the model simpler and less prone to overfitting.
The number of weak learners, denoted by n , influences the learning ability of the model. Increasing the value of n enhances the model’s capacity to learn complex patterns and relationships in the data. However, it also increases the risk of overfitting, where the model becomes too specialized for the training data. Finding the right balance for the value of n is crucial to ensure optimal prediction performance and accuracy of the model.
To enhance the prediction accuracy of the model while taking into account computational costs, this study proposes adjusting the four crucial hyperparameters ( η , θ , m , n ) that significantly impact the prediction performance of the XGBoost model using the Cuckoo Search algorithm.

4.3. Cuckoo Search-XGBoost Model

4.3.1. Cuckoo Search Algorithm (CS)

Grid search is one of the effective methods for determining optimal hyperparameters. However, as the number of hyperparameter dimensions increases, the computational cost of grid search grows exponentially. To mitigate this high computational burden, simulation algorithms like the Cuckoo Search have emerged for optimizing black-box functions.
In the Cuckoo Search algorithm, the process imitates the behavior of cuckoos searching for nests, with nests and eggs symbolizing potential solutions. The algorithm adheres to three fundamental rules:
(1)
Each cuckoo can only lay one egg at a time and selects a nest randomly to place it in.
(2)
A subset of nests is randomly chosen, and the best parasitic nests are retained for the next generation.
(3)
The number of nests remains constant, and the host cuckoo’s probability of finding a cuckoo’s egg is determined by P a . If a host finds an egg, it can either destroy the egg or continue searching for a new nest.
Cuckoo Search employs global random wandering through Levy flight to update the global optimal solution. This combination of cuckoo searching and Levy flight facilitates efficient exploration of the hyperparameter space, leading to the discovery of optimal solutions while minimizing computational costs.
ψ l + 1 i = ψ l i + α s
where α represents the scaling factor for the step length, and in this case, α is set to 1 . s = u | v | 1 / ω l e v y ( ω ) , u N ( 0 , σ l 2 ) , v N ( 0,1 ) , ω = 1.5 .

4.3.2. CS-XGBoost Model

The effectiveness of the XGBoost model is heavily influenced by the values of its parameters. To construct the CS-XGBoost model and optimize the XGBoost parameters using cuckoo search, the following steps are followed:
Step 1: Determine the corresponding parameters for the cuckoo search, including the maximum number of iterations ( L ), the probability of nest discovery by a bird ( P a ), and the initial solution ψ 0 = ( η , θ , m , n ).
Step 2: Initialize the parameters ψ 1 , ψ 2 , …, ψ d and define the objective function φ ( ψ i ) as the loss function value of the test set, where i ranges from 1 to d . Here, d represents the number of solutions.
Step 3: Randomly select a solution ψ i from the available d solutions. Calculate the objective function φ ( ψ i ) , and use Equation (6) to update it, resulting in the new position of the cuckoo’s nest. Calculate the objective function φ ( ψ j ) for this new solution ψ j . If φ ( ψ i ) > φ ( ψ j ) , then replace ψ i with ψ j .
Step 4: Iterate φ ( . ) , i = 1 , 2 , …, d to find the optimal parameter solution ψ l o p t , keep ψ l o p t until the next iteration, and with probability P a to discard other non-optimal parameter solutions and find a new solution by Levy flights.
Step 5: The iteration process is terminated, and the final optimal parameter solution ψ d o p t is obtained. This optimal solution is then substituted into the XGBoost model.

5. Results

5.1. Control Group Experiment of the SVM Model, RandomForest Model, and XGBoost Model

Support Vector Machine (SVM) is a supervised learning algorithm that was first introduced in 1964 [33]. It is based on the principle of structural risk minimization and is known for its strong generalization ability. SVM finds applications in various fields, including image recognition, audio and video recognition, text recognition, and more. Random Forest is a widely used machine learning model for classification problems. It was introduced by Leo Breiman in 2001 and combines bagging ensemble learning with the random subspace method [34].
The dataset (composed of mixed A, B, A’, and B’) was divided into ten parts using ten-fold cross-validation. Nine parts were used as training data, while one part served as test data for each experiment. Table 3 displays a comparison of evaluation metrics among the three models. The SVM model and RandomForest model have also been optimized using corresponding Python models to traverse some parameters. The CS-XGBoost model demonstrates superior performance compared to the XGBoost model with default parameters, followed by the SVM model and the RandomForest model. Among the four models, the CS-XGBoost model attains the highest values for all four evaluation metrics, indicating its effectiveness in classifying nursing behavior.

5.2. Three Groups of Experiments Based on CS-XGBoost

The nursing care activity data in this paper come from two groups of volunteers, which were collected when carrying out elderly nursing care services with (A’ and B’) and without (A and B) constraints, respectively. The following three groups of experiments are designed:
(1) Experiment 1: Data from a group of volunteers under constraints are used as training samples for parameter learning of the recognition model, and data from the other group of volunteers under constraints are used as training data, that is, to carry out the experiments Train (A’) → Test (B’) and Train (B’) → Test (A’), and the confusion matrix is shown in Table 4.
It can be seen from the confusion matrix in Table 4 that the overall recognition performance result is relatively good, the highest values of the three evaluation indicators reach 1. However, there are certain differences in the models for the different volunteer groups completing nursing care activities under constraints as shown in Table 5, mainly due to some relatively complex nursing care activities.
Different volunteers have different understandings and executions of action points and norms, which leads to a certain difference in the recognition results of the model. Therefore, to better recognize nursing care activities based on wearable devices, it is necessary to give further detailed and clear instructions on the action standards and behavior specifications of these nursing care activities so that volunteers can regulate them more uniformly when completing these nursing care activities.
(2) Experiment 2: Apart from the constrained or unconstrained data of one group used as testing data, the rest of the data are all used as training data. The purpose is to verify the recognition performance of the CAR model for unknown action patterns that are close to the real situation.
From the confusion matrix given in Table 6, it can be seen that the recognition precisions, f1-scores, and recall values for the CAR model in Experiment 2 decrease greatly compared to those in Experiment 1. The challenge is that the training model lacks relevant information about the unconstrained nursing care activities in the testing data, and the volunteers perform unconstrained nursing care activities that usually have large differences in the amounts and complexities of actions.
The results in Table 7 show that although the constrained datasets A’ and B’ are not used in the model training phase, the accuracies of their recognition are relatively good at 0.9488 and 0.9166, respectively, because after explaining the key points and norms of nursing action to the nursing staff, the differences in action patterns among different volunteers are relatively small. However, during the model training phase, unconstrained datasets A and B are not used. Then, the unconstrained data are recognized, and the accuracies of A and B (0.8012 and 0.7821, respectively) are significantly lower than the recognition accuracies of A’ and B’ because there are no instructions on the action standards and behavior specifications of these nursing care activities given to the volunteers in the latter datasets, and which leads to significant differences in movement patterns between the different volunteers.
(3) Experiment 3: As an extension of Experiment 2, this experiment uses mixed data (constrained data and unconstrained data) of two groups for training and constrained data or unconstrained data of one group for testing, and the results are shown in Table 8 and Table 9. Unlike Experiment 2, this experiment verifies whether there are other unconstrained data which can help improve the classification accuracy.
The experimental results show that using both constrained data and unconstrained data from nursing care activities for model training results in a general model with a better recognition performance. Both the constrained nursing care activity data and unconstrained nursing care activity data for identifying the nursing staff’s future nursing care activities yield high recognition precision.

6. Conclusions and Discussion

Taking into account the application requirements of elderly nursing care service management, this paper first proposes the research of elderly CAR based on sensor data on wearable devices. Currently, the nine selected nursing care activities are distinct from one another and easy to recognize. However, in real-world elderly nursing care scenarios, some actions may not be feasible to recognize technically. On the one hand, there are relatively small and rapid actions, such as reminding, encouraging, or admonishing the elderly in specific scenarios, and on the other hand, some are easily confused by nursing behaviors, such as checking the physical condition of the elderly. There is no unified pattern for such behaviors. These issues may be solved by increasing the variety and number of wearable devices, which can result in greater differentiation and more accurate classification of behaviors. From the perspective of home care, these behaviors are equally important.
In addition, the nine behaviors classified in this study all require actual execution, which means that they do not include the behaviors of nursing staff resting and staying still. If we consider these relatively static behaviors of nursing staff, it may lead to misclassifying some behaviors that need to be actually executed as static behaviors, and vice versa. Therefore, considering relatively static rest behaviors for identifying and monitoring home-based elderly nursing care behaviors will also be an important aspect of future research.
The characteristics of the XGBoost model in machine learning algorithms, with more accurate recognition and faster computing time, have also been fully demonstrated in the field of behavior recognition. The experiments show that the CS-XGBoost model has better recognition performance than the XGBoost model with the default parameters, SVM, and RandomForest models.
Based on the experimental results based on the CS-XGBoost model, we obtained our observations of the applicability of the algorithms to actual elderly nursing care service management and summarized our suggestions on how to further validate management feasibility by collecting more data from home staff. To improve the accuracy of nursing care activities recognition in practical applications, adjustments can be made from the following three aspects: (1) try to use actual nursing care data from real-world nursing care activities as training data to model the classifiers; (2) standardize nursing care activities to make them uniform since uniform action patterns can be easily recognized; (3) try to collect elderly nursing care data from several different nursing staff and use the data for modeling, which helps to create more general classifiers and avoids overfitting.

Author Contributions

Conceptualization, Z.L. and X.L.; Methodology, Z.L.; Formal analysis, X.L.; Investigation, S.Z.; Resources, H.Z.; Data curation, Z.L.; Writing—original draft, Z.L.; Writing—review & editing, S.Z.; Visualization, S.Z. and X.L.; Supervision, H.Z.; Project administration, Z.L.; Funding acquisition, Z.L. and H.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Funds for First-class Discipline Construction (XK1802-5) of Beijing University of Chemical Technology and the Fundamental Research Funds for the Central Universities (ZY2430).

Data Availability Statement

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Sander, M.; Oxlund, B.; Jespersen, A.; Krasnik, A.; Mortensen, E.L.; Westendorp, R.G.J.; Rasmussen, L.J. The challenges of human population ageing. Age Ageing 2015, 44, 185–187. [Google Scholar] [CrossRef]
  2. Otsu, K.; Shibayama, K. Population aging and potential growth in Asia. Asian Dev. Rev. 2016, 33, 56–73. [Google Scholar] [CrossRef]
  3. Oku, A.; Ichimura, E.; Tsukamoto, M. Aging Population in Asian Countries|Lessons from Japanese Experiences; Policy Research Institute, Ministry of Finance: Tokyo, Japan, 2017. [Google Scholar]
  4. CPC Central Committee and State Council. The 19th National Congress of the Communist Party of China, Longterm Plan for the Country to Actively Cope with Population Aging; CPC Central Committee and State Council: Beijing, China, 2019. [Google Scholar]
  5. Liu, J.; Dai, P.; Han, G.; Sun, N. Combined CNN/RNN video privacy protection evaluation method for monitoring home scene violence. Comput. Electr. Eng. 2023, 106, 108614. [Google Scholar] [CrossRef]
  6. Wang, Q.; Zhang, W.; Li, J.; Ma, Z.; Chen, J. Benefits or harms? The effect of online review manipulation on sales. Electron. Commer. Res. Appl. 2023, 57, 101224. [Google Scholar] [CrossRef]
  7. Kawsar, F.; Ahamed, S.; Love, R. Remote monitoring using smartphone based plantar pressure sensors: Unimodal and multimodal activity detection. In Proceedings of the Smart Homes and Health Telematics: 12th International Conference, ICOST 2014, Denver, CO, USA, 25–27 June 2014; Revised Papers 12. pp. 138–146. [Google Scholar]
  8. Foerster, F.; Smeja, M.; Fahrenberg, J. Detection of posture and motion by accelerometry: A validation study in ambulatory monitoring. Comput. Hum. Behav. 1999, 15, 571–583. [Google Scholar] [CrossRef]
  9. Mukhopadhyay, S.C. Wearable sensors for human activity monitoring: A review. IEEE Sens. J. 2014, 15, 1321–1330. [Google Scholar] [CrossRef]
  10. Jameer, S.; Syed, H. A DCNN-LSTM based human activity recognition by mobile and wearable sensor networks. Alex. Eng. J. 2023, 80, 542–552. [Google Scholar] [CrossRef]
  11. Garcia-Gonzalez, D.; Rivero, D.; Fernandez-Blanco, E.; Luaces, M.R. Deep learning models for real-life human activity recognition from smartphone sensor data. Internet Things 2023, 24, 100925. [Google Scholar] [CrossRef]
  12. Wichum, F.; De Lazzari, N.; Götte, M.; David, C.; Wiede, C.; Seidl, K.; Tewes, M. Development of an AI-supported exercise therapy for advanced cancer patients. Curr. Dir. Biomed. Eng. 2022, 8, 169–172. [Google Scholar] [CrossRef]
  13. Semwal, V.B.; Kim, Y.; Bijalwan, V.; Verma, A.; Singh, G.; Gaud, N.; Baek, H.; Khan, A.M. Development of the LSTM Model and Universal Polynomial Equation for all the Sub-phases of Human Gait. IEEE Sens. J. 2023, 23, 15892–15900. [Google Scholar] [CrossRef]
  14. Peng, Y.; Nabae, H.; Funabora, Y.; Suzumori, K. Controlling a peristaltic robot inspired by inchworms. Biomim. Intell. Robot. 2024, 4, 100146. [Google Scholar] [CrossRef]
  15. Mao, Z.; Asai, Y.; Yamanoi, A.; Seki, Y.; Wiranata, A.; Minaminosono, A. Fluidic rolling robot using voltage-driven oscillating liquid. Smart Mater. Struct. 2022, 31, 105006. [Google Scholar] [CrossRef]
  16. Lara, O.D.; Labrador, M.A. A survey on human activity recognition using wearable sensors. IEEE Commun. Surv. Tutor. 2012, 15, 1192–1209. [Google Scholar] [CrossRef]
  17. Arshad, M.H.; Bilal, M.; Gani, A. Human activity recognition: Review, taxonomy and open challenges. Sensors 2022, 22, 6463. [Google Scholar] [CrossRef] [PubMed]
  18. Ho, T.K. Random decision forests. In Proceedings of the 3rd International Conference on Document Analysis and Recognition, Montreal, QC, Canada, 14–16 August 1995; pp. 278–282. [Google Scholar]
  19. Ho, T.K. The random subspace method for constructing decision forests. IEEE Trans. Pattern Anal. Mach. Intell. 1998, 20, 832–844. [Google Scholar]
  20. Su, J.; Zhang, B.; Xu, X. Research progress of text classification technology based on machine learning. J. Softw. 2006, 17, 1848–1859. [Google Scholar] [CrossRef]
  21. Tomoya, S.; Harusa, T.; Soichiro, S.; Yohei, H.; Yang, L.; Ying, C. Fundamental study of a sports motion analysis system by using DNN recognition. Proc. Symp. Sports Hum. Dyn. 2018, 2018, C-30. [Google Scholar]
  22. Walse, K.H.; Dharaskar, R.V.; Thakare, V.M. Pca based optimal ann classifiers for human activity recognition using mobile sensors data. In Proceedings of the First International Conference on Information and Communication Technology for Intelligent Systems: Volume 1, Ahmedabad, India, 28–29 November 2015; pp. 429–436. [Google Scholar]
  23. Hammerla, N.Y.; Halloran, S.; Plötz, T. Deep, convolutional, and recurrent models for human activity recognition using wearables. J. Sci. Comput. 2016, 61, 454–476. [Google Scholar]
  24. LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
  25. Wang, J.; Chen, Y.; Hao, S.; Peng, X.; Hu, L. Deep learning for sensor-based activity recognition: A survey. Pattern Recognit. Lett. 2019, 119, 3–11. [Google Scholar] [CrossRef]
  26. Wu, H.; Zhang, Z.; Li, X.; Shang, K.; Han, Y.; Geng, Z.; Pan, T. A novel pedal musculoskeletal response based on differential spatio-temporal LSTM for human activity recognition. Knowl.-Based Syst. 2023, 261, 110187. [Google Scholar] [CrossRef]
  27. Hayat, A.; Morgado-Dias, F.; Bhuyan, B.P.; Tomar, R. Human activity recognition for elderly people using machine and deep learning approaches. Information 2022, 13, 275. [Google Scholar] [CrossRef]
  28. Inoue, M.; Inoue, S.; Nishida, T. Deep recurrent neural network for mobile human activity recognition with high throughput. Artif. Life Robot. 2018, 23, 173–185. [Google Scholar] [CrossRef]
  29. Xia, K.; Huang, J.; Wang, H. LSTM-CNN architecture for human activity recognition. IEEE Access 2020, 8, 56855–56866. [Google Scholar] [CrossRef]
  30. Jindal, S.; Sachdeva, M.; Kushwaha, A.K.S. Human Activity Recognition using Ensemble Convolutional Neural Networks and Long Short-Term Memory. Int. J. Perform. Eng. 2022, 18, 660. [Google Scholar]
  31. Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM Sigkdd International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
  32. Jolliffe, I.T.; Cadima, J. Principal component analysis: A review and recent developments. Philos. Trans. 2016, 374, 20150202. [Google Scholar] [CrossRef] [PubMed]
  33. Vapnik, V.N. A note on one class of perceptrons. Autom. Remote Control 1964, 25, 821–837. [Google Scholar]
  34. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
Figure 1. The population aged 60 and above and its proportion of the total population of China.
Figure 1. The population aged 60 and above and its proportion of the total population of China.
Mathematics 12 01700 g001
Figure 2. Sensor data collection from wearable devices.
Figure 2. Sensor data collection from wearable devices.
Mathematics 12 01700 g002
Figure 3. Flow chart for CAR solution.
Figure 3. Flow chart for CAR solution.
Mathematics 12 01700 g003
Figure 4. Feature importance analysis.
Figure 4. Feature importance analysis.
Mathematics 12 01700 g004
Table 1. Caregivers’ activities to be identified in this study.
Table 1. Caregivers’ activities to be identified in this study.
TagsCaregivers’ ActivityData Acquisition Duration
S1Sweeping the floor300 s
S2Thumping one’s legs180 s
S3Feeding300 s
S4Slapping one’s back180 s
S5Moving objects300 s
S6Wiping a window300 s
S7Wiping a desk300 s
S8Washing one’s face180 s
S9Washing clothes180 s
Table 2. Variable descriptions.
Table 2. Variable descriptions.
Device NameVariable Name
Hitoeacceleration(h_acc_x, h_acc_y, h_acc_z)
TicWatch_1acceleration(t1_acc_x, t1_acc_y, t1_acc_z)
gravity(t1_grty_x, t1_grty_y, t1_grty_z)
gyroscope(t1_gyscp_x, t1_gyscp_y, t1_gyscp_z)
linear acceleration(t1_linr_acc_x, t1_linr_acc_y, t1_linr_acc_z)
TicWatch_2acceleration(t2_acc_x, t2_acc_y, t2_acc_z)
gravity(t2_grty_x, t2_grty_y, t2_grty_z)
gyroscope(t2_gyscp_x, t2_gyscp_y, t2_gyscp_z)
linear acceleration(t2_linr_acc_x, t2_linr_acc_y, t2_linr_acc_z)
Table 3. Comparison of the performance of the SVM model, RandomForest model, and XGBoost model.
Table 3. Comparison of the performance of the SVM model, RandomForest model, and XGBoost model.
AccuracyPrecisionRecallF1 Score ψ = ( η , θ , m , n )
SVM0.89780.89070.87960.8851——
RandomForest0.90130.89910.90150.9002——
XGBoost0.91790.90210.91960.9107(0,0.3,6,2000)
CS-XGBoost0.94380.95110.95020.9506(0.05,0.1,4,2000)
Table 4. Confusion matrix for the classification results of the experimental Train (B’) → Test (A’) classification results.
Table 4. Confusion matrix for the classification results of the experimental Train (B’) → Test (A’) classification results.
ServiceS1S2S3S4S5S6S7S8S9Recall
S1145000000080.9477
S209000300000.9677
S3001500500000.9677
S400094000001
S5050014700000.9671
S6000021510000.9869
S7000020151000.9869
S800051008700.9355
S901000000930.9894
precision10.937510.94950.91871110.9208
f1_score0.97310.95240.98360.97410.94230.99340.99340.96670.9538
Table 5. Recognition accuracies of different experimental datasets in Experiment 1.
Table 5. Recognition accuracies of different experimental datasets in Experiment 1.
TrainTestS1S2S3S4S5S6S7S8S9
B’A’10.937510.94950.91871110.9208
A’B’0.94411110.52000.99320.98690.98080.9737
Table 6. Confusion matrix of the experimental Train (A’, B’, A) → Test (B) classification results.
Table 6. Confusion matrix of the experimental Train (A’, B’, A) → Test (B) classification results.
ServiceS1S2S3S4S5S6S7S8S9Recall
S1880005505000.5946
S207800200220.9286
S3001401200400.9524
S401078030400.9070
S51500012084030.8000
S631074201510.4762
S73000022681190.5436
S8004170006400.7529
S90000000000
precision0.64710.97500.97220.75730.58540.54050.89010.80000
f1_score0.61970.95120.96220.82540.67610.50630.67500.77580
Table 7. Recognition accuracies of different experimental datasets in Experiment 2.
Table 7. Recognition accuracies of different experimental datasets in Experiment 2.
TestingTest (A’)Test (B’)Test (A)Test (B)
Data
Precision
Training Data
train(B’ A B)0.9488
train(A’ A B) 0.9166
train(A’ B’ B) 0.8012
train(A’ B’ A) 0.7821
Table 8. Confusion matrix of the experimental Train (A’, B’, ATr, B) → Test (ATs) classification results (where ATr + ATs = A).
Table 8. Confusion matrix of the experimental Train (A’, B’, ATr, B) → Test (ATs) classification results (where ATr + ATs = A).
ServiceS1S2S3S4S5S6S7S8S9Recall
S1138000832000.9139
S209001000000.9890
S3001430700100.9470
S400089001100.9780
S5200014515000.9477
S6102091229450.8026
S71000103128010.8951
S800001208700.9667
S9100040110830.8384
precision10.980210.99010.97520.95760.972810.9691
f1_score10.98510.99690.99500.97820.97230.96300.99440.9543
Table 9. Recognition accuracies of different experimental datasets in Experiment 3.
Table 9. Recognition accuracies of different experimental datasets in Experiment 3.
TestingTest (ATs)Test (BTs)Test (A’Ts)Test (B’Ts)
Data
Precision
Training Data
train(ATr B A’ B’)0.9898
train(A BTr A’ B’) 0.9973
train(A B A’Tr B’) 0.9202
train(A B A’ B’Tr) 0.9419
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, Z.; Zhang, S.; Zhang, H.; Li, X. A Study on Caregiver Activity Recognition for the Elderly at Home Based on the XGBoost Model. Mathematics 2024, 12, 1700. https://doi.org/10.3390/math12111700

AMA Style

Liu Z, Zhang S, Zhang H, Li X. A Study on Caregiver Activity Recognition for the Elderly at Home Based on the XGBoost Model. Mathematics. 2024; 12(11):1700. https://doi.org/10.3390/math12111700

Chicago/Turabian Style

Liu, Zhonghua, Shuang Zhang, Huihui Zhang, and Xiuxiu Li. 2024. "A Study on Caregiver Activity Recognition for the Elderly at Home Based on the XGBoost Model" Mathematics 12, no. 11: 1700. https://doi.org/10.3390/math12111700

APA Style

Liu, Z., Zhang, S., Zhang, H., & Li, X. (2024). A Study on Caregiver Activity Recognition for the Elderly at Home Based on the XGBoost Model. Mathematics, 12(11), 1700. https://doi.org/10.3390/math12111700

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop