An Elderly Health Monitoring System Using Machine Learning and In-Depth Analysis Techniques on the NIH Stroke Scale

: Recently, with the rapid change to an aging society and the increased interest in healthcare, disease prediction and management through various healthcare devices and services is attracting much attention. In particular, stroke, represented by cerebrovascular disease, is a very dangerous disease, in which death or mental and physical aftereffects are very large in adults and the elderly. The sequelae of such stroke diseases are very dangerous, because they make social and economic activities difficult. In this paper, we propose a new system to prediction and in-depth analysis stroke severity of elderly over 65 years based on the National Institutes of Health Stroke Scale (NIHSS). In addition, we use the algorithm of decision tree of C4.5, which is a methodology of prediction and analysis of machine learning techniques. The C4.5 decision trees are machine learning algorithms that provide additional in-depth rules of the execution mechanism and semantic interpretation analysis. Finally, in this paper, it is verified that the C4.5 decision tree algorithm can be used to classify and predict stroke severity, and to obtain additional NIHSS features reduction effects. Therefore, during the operation of an actual system, the proposed model uses only 13 features out of the 18 stroke scale features, including age, so that it can provide faster and more accurate service support. Experimental results show that the system enables this by reducing the patient NIH stroke scale measurement time and making the operation more efficient, with an overall accuracy, using the C4.5 decision tree algorithm, of 91.11%. ratio FP. identified data for each class. accuracy is the percentage of identified data for each class divided by data elements of all classes.


Introduction
The number of deaths in Korea in 2015 was recently reported to be 275,895 [1]. The cause of death was reported as malignant neoplasm (76,855), heart disease (28,326), and cerebrovascular disease (24,455) [1]. In particular, the death rate from cerebrovascular disease in Koreans is 48 per 100,000 people, followed by malignant neoplasm and heart disease. The number of deaths due to cerebrovascular disease in Korea has been declining since 2005, but it is the second leading cause of death due to a single disease after malignant neoplasm [1][2][3]. According to the analysis information of these institutions, Korea is continuously growing in chronic diseases due to aging. In particular, according to a recent study, the elderly over 60 years of age are showing an increasing mortality rate from the cardiovascular system disease [3][4][5][6]. The stroke is difficult to reliably evaluate the stroke and neurological damage, due to the various symptoms and the location of the stroke. In particular, the early detection of stroke is important for a person without a past medical history, but the probability of recurrence is nine times higher for people with a past history of stroke. As a result, in order to diagnose and treat physicians within a short period of time, research should be conducted for the continuous monitoring and management of patients with stroke.
According to recent studies, National Institutes of Health Stroke Scale (NIHSS)-based research topic objectively validates stroke severity and various studies are under way to stroke detection and use risk factors to prevent recurrence [7][8][9][10][11]. Since the Mathew scale was first published in 1972, methods for evaluating a stroke patient's disorder include the European stroke scale, the Scandinavian stroke scale, and the NIHSS of the American National Institutes of Health [12,13]. Among the various NIHSS methodologies, the method proposed by Bortt et al. is widely used tool as measurement criteria after stroke [7][8][9]. NIHSS measures 14 features associated with stroke severity, and statistically, it takes 6.6 min per patient. In addition, it is used as an evaluation health stroke scale, which is relatively easy to measure at the initial stage of a patient, and can be easily performed. According to various studies, stroke predictions can be quickly determined without imaging by using a scoring system based on the NIHSS that can accurately predict cortical damage in an acute ischemic stroke [14,15]. First, the severity of stroke in hospitalization for patients with ischemic stroke and the association of acute patients can be assessed. As such, the NIHSS is widely used globally as a tool, and it has already been verified through various studies for the reliability and validity of not only the examiner but also the test and retest. However, the NIHSS method is a tool to assess the extent of brain damage in stroke patients, but it has disadvantages, in that it does not provide an analytical result for the diagnosis of early stroke.
Another method of analyzing the risk factor of stroke is to find risk factors through previous research, health screening data, and clinical trials. Risk factors of stroke found in these studies include smoking, diabetes, obesity, and smoking [16][17][18][19][20]. Research has reported that stroke-related is not a single factor, but comes from the interaction of various and complex risk factors. Therefore, a new methodology for evaluating each stroke risk factor and deal with diseases early stroke detection or prediction. It is not known exactly when and where stroke disease occurs. Additionally, the recurrence rate of stroke varies according to the type, race, and risk factors, but clinical studies have reported that the recurrence rate is generally 10~15% within 1 year. Studies are underway to analyze stroke risk factors using various machine learning and statistical methodologies. Additionally, the proportional hazards model [20] proposed by Cox [21] or Weibull et al. [22] as a representative method, and Kannel et al. [23] have been reported, based on a logistic model. However, previous studies based on these risk factors are not suitable for predicting the risk of stroke in the elderly. These prior studies have the disadvantage that the stroke severity analysis and prediction system have a black box form, which is difficult to interpret and analyze automatically. Therefore, the provision of scientific analysis and interpretation information is essential, and should be provided as an analysis result. In particular, we need to find a new optimal stroke severity and analysis system for the elderly. Therefore, it is important to quickly detect and predict the early onset of stroke patients, but another important research issue is to find the recurrence of stroke in patients with a history of stroke.
In this paper, we propose a new system for predictive and in-depth analysis of stroke severity for the elderly over 65 years old, using NIHSS features and C4.5 decision tree algorithm. We propose a system that automatically classifies and analysis stroke severity into four classes using NIHSS features collected in real-time. The C4.5 decision tree are machine learning algorithms that provide additional in-depth rules of the execution mechanism and semantic interpretation analysis. Therefore, during the operation of an actual system, the proposed model uses only 13 features out of the 18 stroke scale features, including age, so that it can provide faster and more accurate service support. In this paper, it is verified that the C4.5 decision tree algorithm can be used to classify and predict stroke severity, and to obtain additional NIHSS features reduction effects. Finally, the system we developed in this study can be used to predict the risk of individual stroke recurrence, depending on the severity of the disorder and the type of risk factor by gender and by age group over 65 years.
The remainder of this paper is organized as follows. Section 2 discusses the main stroke diseases of the elderly and describes our research subjects and the machine learning for the stroke disease classification and prediction. Section 3 presents the proposed system of stroke severity prediction and in-depth analysis in the elderly. Section 4 describes the experimental results and analysis contents. In the Section 5, conclusions and future research are discussed.

Stroke Disease of the Elderly
A stroke is defined as a localized neurological deletion that is suddenly induced in poor blood flow. These strokes are called cerebrovascular stroke, and in terms of symptoms, the typical symptoms are classified as cerebral infarction and cerebral hemorrhage, caused by bleeding of the blood vessels [4][5][6]. These strokes are caused by rupture or blockage of the blood flow of the brain stem, resulting in sudden brain dysfunction, such as speech or movement disorders, sensory disorders, paralysis, or unconsciousness [24,25]. Cerebral infarction is classified into cerebral thrombosis, which is caused by blood clotting in cerebral blood vessels damaged by arteriosclerosis and blood clots; and cerebral embolism, which is caused by clotting of the blood vessels for large arteries, such as the heart and carotid arteries. Cerebral hemorrhage is represented by intracerebral hemorrhage and subarachnoid hemorrhage. Intracerebral hemorrhage is caused by spontaneous brain hemorrhage without external impact. Subarachnoid hemorrhage is a disease in which blood flows out into the subarachnoid space surrounding the brain, by the rupture of an aneurysm of the alveolar structure that grows in the blood vessel. Subarachnoid hemorrhage is reported to be a fatal disease, as more than 30% of the patients die before they arrive at the emergency medical center or hospital. In Korea, the health-screening information of the National Health Insurance Corporation (NHIS) [26], Lee et al. [27] developed a stroke prediction model after 10 years, using age, drinking, systolic and diastolic blood pressure, diabetes, LDL cholesterol, HDL cholesterol, total cholesterol, et al. However, since these studies are identical to the Framingham Heart's model and predict the stroke risk index in the next 10 years, they do not apply to the real world [16,27]. In addition, it does not take into account some of the major risk factors for stroke, and has a limitation, in that it does not consider the competition risk, such as the possibility of death other than by stroke. According to the recent research literature, the stroke should be accurately identified within 3 h, including the type and location of the stroke, and how much damage has occurred. It is also important to send the patient to a hospital or emergency medical center, so that they can receive the appropriate treatment within 3 h, known as the golden time.

Research Subjects and Methods
In this paper, the NIHSS to be used in the experiment were collected at the emergency medical center of Chungnam National University Hospital in Korea. Data collection for stroke patients was conducted within 3 days of the definite diagnosis date and data was collected from 287 patients from 2015 to 2017. Experimental data collected after 3 days of stroke definite diagnosis date that 16 patients (no stroke symptoms) with a value of 0 for NIHSS were included, indicating no specific stroke symptoms. We selected 227 NIHSS data from the finally selected clinical trial data, excluding 44 patients with outlier or missing values. Experimental patients were older than 65 years consisting of 117 men and 110 women. Table 1 shows the results of a standard deviation analysis for age. Table 2 below shows the distribution of variables for 287 subjects diagnosed with stroke. The following Tables 3-5 shows the distribution of data measured in the emergency room for stroke patients. Table 3 shows the statistical distribution of normal and abnormal inclusion of blood pressure and blood test lists of stroke patients measured in the emergency room [28]. Table 4 and Table 5 below describes the statistical distribution of normal and abnormal conditions, such as emergency chemical, coagulation, and urinalysis test lists [29].   The collected NIHSS data includes 17 features and age information in a medical examination, as shown in Table 5 below. All stroke patients were subjected to a pre-defined measurement scenario in a separate room in the emergency center, and NIHSS feature values were accurately assessed according to patient response. In this study, we scored the patients based on the NIHSS, and the scores for each item were analyzed using the Spearman correlation coefficient. In addition, the Spearman correlation coefficients (rho) for each NIHSS feature were statistically verified (see Table 6 below).

Machine Learning in Stroke Analysis and Disease Prediction
According to a recent research, data mining and machine learning methodologies have an important role in the diagnosis and prediction of diseases in the healthcare application [30][31][32][33][34][35].
Recently, various studies have been published on the prediction and analysis of brain diseases, using data mining and machine learning methodology [30][31][32][33][34]. A decision tree is a method of decision support tool that shows the various rules and their results in a tree structure. A decision tree is a treelike structure, where each internal node denotes a test on a feature, each current node describes a decision result, and leaf node or each terminal node holds a class label. Typically, the topmost node in the tree is the root node. These decision tree methods are intuitive in predicting results, and generate rules logically and conveniently [35][36][37][38]. ID3 is a representative algorithm of decision tree, and the high-rank node has a disadvantage in selecting a feature having a wide range of values [37]. Therefore, in this paper, we introduced the C4.5 decision tree algorithm that alleviates these disadvantages [38]. C4.5 is the most advanced decision tree algorithm, and has proved that classification and prediction performance is advanced in many existing researches [37][38][39]. In C4.5 decision tree, each node in the tree has an association between cases, and this case, are assigned weights, considering the unknown feature values.
When there is an arbitrary set Y, the information gain value of attribute a is calculated as follows. Now, consider a similar measurement after Y has been partitioned in accordance with the n outcomes. The expected information requirement can be found as the weighted sum over subsets, as gain or gain(Y). Here, Yi means the i-th set of arbitrary set Y. The expected information needed to classify a tuple in Y is given by The quantity Equation (1) measures is the information that is gained by partitioning Y in accordance with the test subsets. The gain criterion, selects a test subset to maximize this information gain.
where is the entropy function. Here, freq(Cj, Y) means the frequency of appearance of the j-th class in arbitrary set Y. The information gain measure is biased toward tests with many outcomes. Apply a kind of normalization to the information gain using the 'split information' value defined analogously with info(Y) calculated in Equation (2) above. By analogy with the definition of info(Y), we have This represents the potential information generated by dividing Y into n subsets, whereas the information gain measures the information relevant to classification that arises from the same division. It is easy to see that the gain and gain ratios are zero if we select the discrete attribute or feature at the parent ancestor node. Therefore, the C4.5 decision tree does not calculate the value of the information gain for this attribute or feature. In Equation (3) above, Y is divided into subset of n, to generate a potentially inherent information value, but the information gain value calculates information related to classification and prediction occurs on the same node. The gain ratio is defined as The gain ratio(Y) obtained from the above Equation (4) represents the ratio value of information generated by partitioning [38]. The feature with the highest gain ratio(Y) value at that node is the partitioned value, i.e., that appears helpful for classification and prediction.

A Stroke Severity Prediction and In-Depth Analysis System Using NIHSS
In this section, we propose a new system for real-time predicting and in-depth analysis the severity of strokes based on NIHSS features. Figure 1, below, illustrates the overall architecture of our proposed system. The system consists of NIHSS features collection module, medical data server, real-time stroke severity prediction and analysis, cloud-based stroke monitoring and emergency alarm modules. Our medical data center has real-time patient NIHSS data and a health-screening information update module and the training and prediction server module for real-time stroke severity, while each patient has a smart device in a server and various healthcare sensors (smart phone, healthcare device, etc.) to collect the NIHSS 17 features and age. The NIHSS-based stroke severity prediction and in-depth analysis system proposed in this paper is used for execution and service according to the following procedure.
1. Elderly users of stroke severity prediction and in-depth analysis applications collect real-time NIHSS data using various healthcare devices. The collected NIHSS data is transmitted to the medical network server through a wired or wireless communication network. 2. The medical data server updates in real-time the NIHSS data collected by individual patients. In addition, the individual NIHSS data and health medical examination information are saved and transmitted to the health-screening information collection in the repository. 3. Individual health screening and NIHSS data stored in the database of health screening data collection should be updated after filtering outlier or missing values. The data collected and stored in the database of health screening data collection is transmitted, in real-time, to the individual patient shared authentication module. 4. The patient data and information collected at the medical center repository are forwarded to a module that generates a stroke severity learning model. Stroke severity learning model using NIHSS data analyzes patient-specific NIHSS data collected in real-time to determine the severity of stroke risk. In addition, to predict and analyze more accurate and faster stroke severity, important features in the medical center repository are selected or reduced, to ensure optimal prediction accuracy. 5. The stroke severity learning and prediction model of the present system can select various machine learning algorithms and perform learning repeatedly. We also provide models that provide optimal prediction accuracy and analysis information through repetitive learning and performance verification. 6. When NIHSS data collected in real-time is executed in the predictive model, it is possible to determine the severity of stroke and in-depth analysis information. In addition, the stroke severity prediction value and analysis information is provided to the system administrator. System administrators can provide alarms for stroke risk to patients and their families. 7. In general, machine learning is a mechanism that generates a prediction model through random learning, and classifies and predicts real-time stroke severity by class using actual data. In this system, semantic analysis and in-depth analysis algorithms, such as the C4.5 decision tree, Bayesian, logistic regression, and random forest, which are represented by an analytical model rather than a black box of machine learning, can be utilized. 8. Stroke severity management and monitoring server in the cloud-based environment receives the prediction and in-depth analysis of the severity for each patient. In addition, the stroke severity value and the analysis information are transmitted to the patient and the medical doctor, to execute an alarm application for emergency situations.

Experimental Environment and Considerations
In this study, we verified the performance using Hall et al. [40] in a Java-based data mining package and the Shi et al. [41] for extreme gradient boosting. Our experimental data used in this research were collected at the emergency medical center of Chungnam National University Hospital in Korea. Clinical data collection for stroke patients was conducted within 3 days of the definite diagnosis date, and data was collected from 287 patients from 2015 to 2017. We selected 227 HINSS data from the finally selected clinical trial data, excluding 44 patients with outlier or missing values. Experimental patients were older than 65 years consisting of 117 men and 110 women. We divided the research into 17 features, such as the Level of Consciousness (LOC), LOC questions, LOC commands, best gaze, visual, facial palsy, motor leg (left), motor leg (right), motor arm (left), motor arm (right), sensory, dysarthria, best language, limb ataxia, extinction and inattention (formerly neglect), distal motor function (left), and distal motor function (right) of the NIHSS features. Additionally, by including the age in the experimental data, the severity of a stroke patient was measured using a total of 18 features. All stroke patients were subjected to a pre-defined measurement scenario in a separate room in the emergency center, and NIHSS feature values were evaluated according to patient response. Each patient had a normal NIHSS score close to zero, but an elderly patient with a higher score means severe stroke severity. The individual scores from each item are summed to calculate a patient's total NIHSS score. The maximum possible score is 42, and the minimum score is 0. The severity index of the stroke is classified into five classes according to the NIHSS score, as shown in Table 7 below. In a total of 227 stroke patient class distribution, 127 patients with 'minor stroke', 84 patients with 'moderate stroke', 10 patients with 'moderate to severe stroke', and six patients with 'severe stroke'.

An In-Depth Analysis on the Stroke Severity Using Machine Learning
This experiment classifies and predicts the stroke severity using C4.5 decision tree algorithm, which is representative of machine learning methodology. In this experiment, four classes of stroke severity were classified, and their performance was verified. In this study, a total of 227 clinical NIHSS data were used, and a machine learning model was generated by randomly extracting data from 182 patients. We performed the tests with NIHSS data from 45 patients-the remaining 20% who did not participate in the learning model generation. In order to measure the classification and prediction accuracy of the proposed system, we used recall and precision as performance evaluation [42][43][44]. For each patient's NIHSS feature, the data correctly classified into that class is shown as a true positive (TP). Next, the data of misclassification patient are expressed as false positives (FP). The patient's NIHSS data from a class that are falsely labeled as belonging to another class are denoted as false negatives (FN). Recall represents the ratio of TP to TP + FN. Recall means the unit of data that is misclassified by each class. Precision represents the ratio of TP to TP + FP. Precision means the number of correctly identified data for each class. Overall accuracy is the percentage of correctly identified data for each class divided by data elements of all classes.
The accuracy of the stroke severity classification and prediction was measured by experimental comparison with C4.5 decision tree and random forest, logistic regression, classification and regression tree (CART), extreme gradient boosting (XgBoost), naïve Bayes, artificial neural network (ANN), multi-class support vector machine (SVM), and one-class support vector data description (SVDD), a delegate advanced research methodology. We used the correlation feature selection (CFS) described to select the optimal feature subset for an accurate classification and prediction of each class representing stroke severity [42][43][44][45]. The feature subset selected by the CFS is as follows: level of consciousness, LOC questions, LOC commands, facial palsy, motor arm (right), motor leg (left), motor leg (right), best language, dysarthria, extinction and inattention (formerly neglect). Table 9 compares the results of using only 11 features selected by the CFS and the classification and prediction results using all 18 features. The results of the experiment show that the classification and prediction accuracy was higher in the case of using all the features in the initial stroke severity evaluation than in the case of using the optimal 11 feature subset [45][46][47]. For this reason, rather than removing the NIHSS features that are rarely used or duplicated by the CFS [43,46,47], important feature selection was made using the information gain or gain ratio of the decision tree model, such as C4.5 or random forest algorithms. In the C4.5 decision tree algorithm, the parameters are set and tested with the confidence threshold for pruning at 0.5, the seed value is 1, and the minimum number of leaf nodes is 1. In the random forest algorithm, the number of trees was set to 100, the iteration was 200 times, the seed value was set to 1, the tree showed stable performance at least 100, and the iteration was 150 times or more. For logistic regression, the batch size was set to 100 and the ridge parameter value was set to 1.0E-8. In CART, the impurity was set as the splitting rule that best distinguishes the distribution of target variables. In addition, the impurity was set to the gini, the confidence threshold for pruning was 0.5, and the stopping rule was set to end when impurity no longer dropped. In XgBoost, we experimented by setting the learning rate value to 0.25, the learning rate value is set to 0.01, the gamma value to 0, the tree depth to 12, and the subsampling value to 1. The learning rate value showed relatively stable accuracy from 0.01 to 0.001, and, in this paper, the optimal stroke severity prediction accuracy when set to 0.01. Naïve Bayes showed the best performance when the batch size was set to 100 and the number of decimal places was set to 2. ANN was tested by setting the learning rate to 0.03, the momentum to 0.2, the number of hidden layers to 2, and the number of nodes to the hidden layer to 24. In the two SVM algorithms, the trade-off constant C in the Gaussian Kernel function is set to C = 0.1 in both phases. The parameter σ in the Gaussian Kernel function are chosen as 0.02 and 0.03 in the multi-class SVM and one-class SVM of our experiment, respectively. Furthermore, the C4.5 decision tree and random forest algorithms have the advantage of being able to perform an interpretative analysis of stroke severity and rule-based analysis, unlike previous studies. In addition, it has the advantage of predicting stroke severity more quickly and accurately, and executing system operations efficiently. Figure 2 shows our performance evaluation of the overall accuracy. In our experiment, the health stroke scale classification and prediction for elderly were used with different datasets. Figure 2 illustrates the accuracy of stroke severity prediction with all features and only 11 attributes based on CFS. In particular, when generating a predictive model by fixing a training set and a test set, an overfitting problem that works well only in a test set may occur. Therefore, in this experiment, the performance is verified by constructing a training set and a test set with 10-fold and 20-fold cross validation to minimize overfitting, while repeatedly tuning the stroke severity predictive model. As a result, when using all NIHSS features, the C4.5 decision tree algorithm showed the highest classification and prediction accuracy in recall and precision.  Table 10 below shows the C4.5-based classification and overall accuracy of class of stroke severity. In this experiment, a total of 227 clinical NIHSS data were used, and a machine learning model was generated by randomly extracting data from 182 patients. We performed the tests with NIHSS data from 45 patients, the remaining 20% who did not participate in the learning model generation. Each class consisted of 24 minor stroke severity patients, 19 moderate stroke severity patients, one moderate-to-severe stroke patient and one severe stroke patient. The results of the test correctly found 22 out of 24 stroke severity patients in the 'minor stroke' class, 16 out of 19 stroke severity patients in the 'moderate stroke' class, and classified and predicted the 'moderate-to-severe stroke' and 'severe stroke' class for either patient (refer to Table 9). Experimental results show that the system enables this by reducing the patient NIH stroke scale measurement time and making the operation more efficient, with overall accuracy using the C4.5 algorithm of 91.11%.  Figure 3 shows a C4.5-based tree structure for the classification and prediction by stroke severity types of the Korean elderly. The figure shows than stroke severity types can be precisely classified with thirteen features. The twenty rules obtained from this experiment are shown in Figure 3 below (refer to Table 11).

> 2 >1 and <=2
Our analysis of the rules in Table 11 of the C4.5 decision tree reveals that the stroke severity could be precisely classified and predicted with only 13 out of the 18 features that were defined in this system. Therefore, reducing the features used in the classification and prediction can not only improve the classification and prediction speed, but can also can improve the precision of the classification and prediction system.

Conclusions
In this paper, we propose a system to detect and in-depth analysis stroke severity of elderly aged over 65 years based on the NIHSS features, based on the C4.5 decision tree algorithm. The proposed stroke severity prediction and in-depth analysis system has the following advantages. First, our system that automatically classifies and analysis stroke severity into four classes using NIHSS features collected in real-time. Second, the system provides patients and their families with alarm information of stroke severity in real-time, so patients can receive medical center visits and emergency care. Third, the additional in-depth rules provided in C4.5 decision tree were analyzed, and semantic analysis was performed. Lastly, during the operation of an actual system, the proposed model uses only 13 features out of the 18 NIHSS features, including age, so that it can provide faster and more accurate service support. To summarize the advantages of our system, the NIHSS measurement time of the patient can be scientifically reduced. In addition, it can contribute to securing the golden time for emergency care of a patient and providing highly reliable services.
The in-depth analysis method applied in this paper to stroke severity and stroke disease prediction based on the C4.5 decision tree is innovative research, which has not previously been attempted, and offers considerable potential for future applications. However, decision tree algorithms, due to their nature, do not provide as complete a semantic analysis as the predictive model algorithm. Therefore, our future work will use association rule mining as a research tool for useful knowledge discovery and analysis, which is inherent in the mechanism for initial stroke assessment of disability and the recurrence prediction.