Next Article in Journal
Using Machine Learning to Predict 30-Day Hospital Readmissions in Patients with Atrial Fibrillation Undergoing Catheter Ablation
Next Article in Special Issue
Implementation and Continuous Monitoring of an Electronic Health Record Embedded Readmissions Clinical Decision Support Tool
Previous Article in Journal
Postulated Adjuvant Therapeutic Strategies for COVID-19
Previous Article in Special Issue
Automatic Labeled Dialogue Generation for Nursing Record Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of Machine Learning Techniques to Analyze Patient Returns to the Emergency Department

by
Antonio Sarasa Cabezuelo
Department of Computer Systems and Computing, School of Computer Science, Complutensian University of Madrid, 28040 Madrid, Spain
J. Pers. Med. 2020, 10(3), 81; https://doi.org/10.3390/jpm10030081
Submission received: 8 July 2020 / Revised: 22 July 2020 / Accepted: 6 August 2020 / Published: 7 August 2020
(This article belongs to the Special Issue Use of Clinical Decision Support Software within Health Care Systems)

Abstract

:
The study of the quality of hospital emergency services is based on analyzing a set of indicators such as the average time of first medical attention, the average time spent in the emergency department, degree of completion of the medical report and others. In this paper, an analysis is presented of one of the quality indicators: the rate of return of patients to the emergency service less than 72 h from their discharge. The objective of the analysis was to know the variables that influence the rate of return and which prediction model is the best. In order to do this, the data of the activity of the emergency service of a hospital of a reference population of 290,000 inhabitants were analyzed, and prediction models were created for the binary objective variable (rate of return to emergencies) using the logistic regression techniques, neural networks, random forest, gradient boosting and assembly models. Each of the models was analyzed and the result shows that the best model is achieved through a neural network with activation function tanh, algorithm levmar and three nodes in the hidden layer. This model obtains the lowest mean squared error (MSE) and the best area under the curve (AUC) with respect to the rest of the models used.

1. Introduction

The study of the quality system of hospitals is a necessary activity for the improvement of the services they offer [1]. In recent years, different public and private institutions have established a set of activity and quality indicators that allow the evaluation, monitoring and comparison of the activities of hospital emergency services [2]. For example, the Spanish Society of Emergency Medicine developed a minimum set of indicators establishing a common, homogeneous and reliable system of information in the emergency services [3]. Three groups of indicators [4] are defined: activity (they measure the number of requests for assistance), quality (they measure qualitative aspects of the operation of the service) and result (they measure results reporting the quality, technical and decisive capacity). Among the quality indicators are the following [5]: average time of first medical attention [6], average time spent in the emergency department, degree of completion of the history, information to patients and relatives, diagnostic coding of discharges, proportion of admissions, rate of return to the emergency room and mortality rate in the emergency room [3]. This work will analyze one of the quality indicators mentioned: the rate of return to the emergency room [7]. This measures the number of patients who, after being treated in an emergency department and discharged, return in less than 72 h [8]. The rate of return to the emergency room is calculated as the quotient (multiplied by a thousand) between the number of patients who return in less than 72 h and the total number of patients who come to the same service in a given period of time. The importance of the study of re-admissions lies in improving the quality of hospital emergency services [2], since avoiding the patient’s return to the emergency room is a consequence of the quality provided [9]. In the field of private healthcare, it is also included as an index of healthcare quality [10].
There are different approaches to analyze the return to the emergency department that vary according to the factors [11,12] that are taken into account to analyze this indicator. A key factor is the time [13,14] that must elapse from discharge to the next visit to consider said return as a return. In [15] the profile of the patients who return is studied through variables such as age, sex, day of the week or pathology, among others. For this, three different times are used, studying separately the patients who return in the first 24 h, those who return between 24 and 48 h, and those who take up to 72 h. The result showed that 88.76% of the patients who return do so in the first 48 h, so they consider that it is not necessary to use a longer time. On the other hand, [16] analyzes whether the time to return to the emergency room influences the short-term mortality of the patients. From the study carried out, it is defined that the return time is any visit that occurs up to eight days after discharge. In [17,18], the optimal time is considered for re-entry. For this, the data on the return to the emergency room of patients in adulthood over a period of 30 days were analyzed, and it was concluded that the most inclusive time was nine days.
Another factor to analyze this variable is the causes that influence returns [19]. Returns to the emergency room occur when, after a certain time from discharge, the patient returns unscheduled and for the same reason as the first appointment [20]. However, a difficulty that arises in these studies is knowing if the return is due to the same reason for the first visit or is due to a cause derived from the first visit [21]. In general, it is preferable to study the return due to any cause [12]. In [22], a study of the rate of return to the emergency department was carried out in order to search for the factors associated with said return. To do this, they classified the causes into four groups: related to the patient, the doctor, the health system and the disease; a classification that serves as a reference for subsequent work. However, it is a very expensive process [23] since different doctors evaluate each case separately and if there is a discrepancy, it should be evaluated by a committee with several reviewers and a doctor. There are quite a few studies [24] showing that the cause of greatest return is that of the disease or the patient. For example, [25] shows that unscheduled returns that occur in the first week after discharge are due to the disease with 48% and the patient with 41%. [26] studied unscheduled returns in the 72 h from discharge and showed that in 60.4% the first cause of return is due to the disease and the second cause with 20.0% is due to the doctor.
Other studies [27,28,29] analyzed the diagnoses of those patients who return, with the aim of observing if there is any type of relationship between readmission and the disease for which they go to the emergency department. For example, in [30] it was found that renal colic and spondylosis were the most frequent diseases of those individuals who returned, followed by headaches.
In general, the studies carried out [31] are based on the use of descriptive methods on demographic variables (degree of disability or life situation) or quantitative variables (drug count, time markers, or diagnostic codes). In machine learning, [32] random forests and gradient boosting have been used to predict return within 30 days [33], or logical regression [34] for time intervals shorter than 72 h, such as in [35]. Another study [36] used a gradient boosting over a range of 72 h to nine days to analyze data from electronic clinical records [37] such as administrative data (demographics, previous hospital use, comorbidity categories, historical vital values and current), treatment data (laboratory values, ECG and imaging counts, drugs administered), data available at the time of triage and data available at the time of discharge.
This article describes a study on the phenomenon of the return of patients to the emergency department of a hospital in less than 72 h. Firstly, the time limit of 72 h was used as it is the most accepted in the scientific literature and contains a greater number of case studies in the dataset used. On the other hand, the objective of the study was established to find the best set of variables that explain the phenomenon and the best machine learning algorithm to model this phenomenon. For this, the binary variable of the rate of return to the hospital emergency department was considered as the objective study variable. In addition, to carry out the analysis the use of machine learning algorithms was proposed (logistic regression [38], neural networks [39], random forest [40], gradient boosting [41] and assembly models [42]). Many of the studies carried out (discussed in the previous paragraphs) are based on classical statistical techniques. However, in this case, the characteristics of the dataset used (which contains a large amount of data (143,803 observations) from a sufficiently broad period from June 2015 to February 2018 inclusively for a total of 33 months) are ideal to be used with machine learning algorithms. The main contributions of this work are the model and the variables obtained that better explain the phenome analyzed. In this sense, the analysis performed indicates that the best model is a neural network with activation function tanh, algorithm levmar and three nodes in the hidden layer, and the set of variables that best explain the phenomenon are pathology2 (corresponding to general medicine), reason_discharge2 (hospitalization of the plant) and reason_discharge5 (evasion). The model found shows a better behavior than the rest of the studied models (since it presents a lower mean squared error (MSE) than the rest of the models and a better area under the curve (AUC)). In addition, the result is consistent with what is stated in the studies of other authors about the non-linear nature of the phenomenon studied (since neural networks generally model quite well phenomena that have non-linear behavior).
The structure of the paper is as follows. In the first section, we will describe the dataset that has been used. The following explains how the data was prepared before performing the analysis (detection of extreme points, treatment of missing data, transformation of data and selection of variables). The next section describes the results of the analysis carried out with each type of machine learning algorithm. In the discussion section, the results are analyzed together to obtain a response to the stated objectives. Finally, a set of conclusions and lines of future work are proposed.

2. Data Analysis

The data analyzed comes from a reference hospital with a population of around 290,000 inhabitants for the period between June 2015 and February 2018 (both included) for a total of 33 months. The number of emergencies attended at this period was 143,803 with a return rate of:
R e t u r n   r a t e = N u m b e r   o f   r e t u r n i n g   p a t i e n t s T o t a l   n u m b e r   o f   p a t i e n s * 1000 = 6209 143803 * 1000 = 43.18
This means that 4.32% of patients returned to the emergency department in less than 72 h.
The main characteristics of the data are:
  • It was anonymous but some personal and medical characteristics of the patients appeared.
  • The data were included in each patient’s electronic medical record by the doctors.
  • There were 62 variables in the data, where 27 were interval variables, 33 were categorical and 2 were nominal free-field variables.
  • The objective variable (which indicates whether a patient returns within 72 h from discharge) was categorical with levels of 0, 1, 2, 3, 4, 5 and 6, where 0 meant that the patient did not return to the emergency department and the rest of the numbers mean that they returned for different reasons.
  • There were categorical variables coded in many different ways. In some of cases, it was not possible to determine the number of levels.
Appendix A shows the tables of the variables of the dataset.

3. Methodology

This section describes the steps to perform the data analysis. The first subsection shows the data preparation process and second subsection introduces the methods used to analyze the data.

3.1. Data Preparation

This subsection describes the stages of data preparation. First, the variables rejected in the analysis are described. Next, a descriptive analysis in order to find anomalies in the data is described. Next, the treatment of the missing data and the transformations of some variables are described. Finally, the selection of the variables that have been considered for study are described.

3.1.1. Variables Rejected

Some variables were rejected for use in the analysis for several reasons that depended on the type of variable:
Interval variables: variables whose content was not interesting for the study were rejected.
  • Categorical variables: only those variables that had well-coded levels (no repeated levels with different names) and that did not exceed 25 levels (the variables that exceeded this limit had too many levels to be grouped) were considered.
As result, 24 variables were rejected:
  • The nominal free field variables: comment and clinical_judgment were rejected since they did not provide information (they cannot be coded and therefore analyzed).
  • The categorical variables: diagnostic_main, entity, diagnostic_group, doctor_family, first_doctor_assigned, first_doctor_consultation, location, doctor_discharge, nhc, procedures, processes and reason_consultation were rejected since they had 25 established and defined levels
  • The interval variables: registration_date, registration_medical_date, consultation_date, emergency_date, admission_date, first_date_consultation, first_date_sol_lab, first_date_sol_rad were rejected because they did not provide relevant information to the study.
  • The interval variable reconsultation_last_year was rejected because it was miscalculated (hospital members reported this situation)
Therefore, 38 variables remained to carry out the analysis.

3.1.2. Descriptive Analysis

A descriptive analysis was carried out in order to observe the available data and do some modification if necessary. The calculated information depends on the type of variable. The interval variables are described in Table 1 (name of variable, mean, missing data, total data, minimum, maximum, standard deviation, skewness and kurtosis).
The categorical variables are described in Table 2 (name of variable, type variable (C, character and N, Nominal), number of levels and number of missing data).
After the initial exploration, some modifications were done:
  • Interval variables: the values that were out of range were modified (Table 3)
  • Categorical variables: some levels were grouped (variables with a large number of levels; variables with empty categories that did not represent an absent value and variables with similar classes). The Table 4 shows the modifications.
Other categorical variables were transformed by modifying their scale. The Table 5 shows the modifications.

3.1.3. Elimination of Outliers

Next, the presence of outliers in the interval variables was analyzed. Values that exceeded three standard deviations from the mean for variables with symmetric distributions and nine MADs (median of absolute distances to the median) for variables with asymmetric distributions (the rest) were considered outliers. Data considered outliers were converted to missing values. The variables with outliers were: age, cardiac_frequency, press_arterial_min, discharge_min_time, observation_min_time, and triage_min_time.

3.1.4. Missing Data Treatment

In this phase, the presence of missing data was analyzed. Variables with more than 50% of missing data are eliminated (imputing so many observations will lead to an error) and when the presence of missing values is not very high then the missing data is replaced by valid values (imputation). In this last case, all variables were imputed randomly, taking into account the distribution of each variable. Table 6 shows the variables with missing values: name of variable, number of missing values and decision about its elimination.

3.1.5. Transformation of Variables

In this phase, the variables that need to be transformed were analyzed. Interval variables were not transformed since the tested transformations (logarithm, root, square, and others) did not improve their R squared. However, categorical variables were modified by converting them into dummy variables (as many dichotomous variables created as the number of categories of each original variable). Variables that only had two classes were excluded from this modification.

3.1.6. Selection of Study Variables

As result of the previous phases, there were two datasets: imputed and with missing values. The selection of variables was done separately for the two datasets since there were different values that could impact the performance of the analysis. The variable selection methods used were: R-square, partial least squares, “step-by-step” regression logistic and decision tree. Table 7 shows a selection of imputed data (the dummies variables are represented in the format: variableNumber. For example, pathology2).
Table 8 shows a selection of missing data.
Among the variables selected three sets were defined (Table 9): set A had fewer variables and it was more conservative and robust; set B had more variables and tended to overfit; and set C included all the variables (including the variables of sets A and B) that resulted from the data preparation phases: six interval variables, 42 binary variables (most were dummy variables), one binary target variable, and one variable nominal ID (this variable allows to identify each data). The three sets were tested for each analysis technique in such a way that the one that worked best in each situation was chosen according to the results obtained.

3.2. Methods of Evaluation

The dataset was randomly divided into training data (with 70% of the total) to build the model and test data (with 30% of the total) to evaluate the errors. In order to evaluate, the models used the following metrics:
  • Misclassification rate: the quotient between the number of erroneous classifications by the technique in the validation set and the total number of observations in the validation.
  • AIC (Akaike information criterion): model comparison measure that rewards goodness of fit and penalizes the number of estimated parameters. It is a measure about goodness of fit of the model
  • SBC (Schwarz Bayesian criterion): model comparison measure that increases the greater the unexplained variation in the dependent variable and the more parameters the model has.
  • MSE (mean squared error): the average of the squared prediction errors.
  • AUC (area under the curve): the area under the ROC (receiver operating characteristics) curve that indicates the discriminatory capacity of the model.
Likewise, two techniques were used in order to compare the models:
  • Repeated training test with different seeds (which consists of carrying out the process of partitioning and creating the model as many times as indicated, since with the repetition of the entire process all the data is used for creation and testing of the model and this reduces the overfit)
  • Repeated cross-validation with different initialization seeds (the sample is divided into k subsets, where one of them is used as test data and the rest as training data; that is, it constructs the model with the data corresponding to k − 1 and evaluates with the rest. This process is repeated during k iterations and the result is the arithmetic mean of each one).
The analysis techniques used were: logistic regression, neural networks, random forest, gradient boosting and model assembly. The analysis techniques used are described in the next section.

4. Results

The study that has been carried out is of an analytical and observational type. It is analytical because it looked for the characteristics of the patients who returned to the hospital 72 h after discharge. In addition, it is observational because the study factor was not assigned by the researcher and was limited to observing, measuring and analyzing certain variables without exercising direct control of the intervention. Finally, from the temporal point of view, it is a cross-sectional and retrospective study that analyzed the data at a specific moment in the past.
Two programs from the SAS statistical processing package were used to perform the analysis.: SAS Enterprise Miner and SAS Base. The first program is interesting because of the large number of results it shows, including graphs and statistics even in the “black box” models, and the second program stands out for the method of evaluating the results (repeated cross-validation), which is more accurate than the one used with SAS Miner.
SAS Miner was used to create the logistic regression and neural network models, while the random forest models were built with SAS Base. This is because the SAS Miner Random Forest modeling node was not working properly and often gave errors. Gradient boosting and assembly models were carried out through the two programs, complementing some results with others. The idea of using both programs was the same: to take advantage of the main advantages of each to obtain more complete results.

4.1. Logistic Regression

This analysis used the imputed data. The processing was carried out as follows:
  • In the first examination, a logistic regression was performed “forward,” “backward” and “step by step” for each of the sets of variables A, B and C. The results (Table 10) show that the misclassification rate was the same in all cases. Although the rest of the statistics vary between the models, nevertheless the best results were obtained with the backward selection method in all the sets of variables. The AUC value shows that the model with the highest discriminatory capacity was the one built with the set of variables C, followed by the models built with the set of variables B and A, in that order. Thus, it was necessary to do a new examination in order to determine which the dataset provided the optimal results.
  • A training test of 10 repetitions and different seeds was carried out to determine the best set of variables. In each iteration, a logistic regression was performed with a backward selection method on each set of variables. The results (Table 11) show small differences between the statistics. However, the best values in terms of model quality throughout the iterations was obtained with the model built with the set of variables A (pathology2, reason_discharge2 and reason_discharge5).
  • Finally, the global significance of the model (Table 12) was checked, obtaining a value of 0.0001 < 0.05.

4.2. Neural Network

The imputed dataset was used in this algorithm. To obtain the best model, the number of hidden layer nodes and the training algorithm were varied. Regarding the activation function, the function tanh (x) = 1 − (2/(1 + e2x) was always used as it works best. The processing was done as follows:
  • First, four networks were built for each of the three sets of variables (12 network models). These four models consisted of the following parameters: three nodes and “bprop” algorithm, three nodes and “levmar” algorithm, seven nodes and “bprop” algorithm, and seven nodes and “levmar” algorithm. The result (Table 13) shows that the dataset C was the worst model since the AIC and SBC statistics were much higher than those of the other models, and the misclassification rate and the AUC were not able to be calculated. With respect of sets A and B, the misclassification rate was the same. However, the best values with respect to the AIC and the AUC were obtained by the set of variables A with seven nodes (regardless of the algorithm). However, the best SBC and MSE values were obtained by the set of variables A with three nodes (regardless of algorithm). Thus, the best set of variables was A. The optimal number of nodes will have to be studied since good results were achieved with three nodes and seven. Finally, it seems that the algorithm did not influence since the models were numerically the same with algorithm “levmar” and “bprop.”
  • In the second exploration, six models were constructed using the set of variables A. Four of them were with the “levmar” algorithm and two of them with the “quasi-Newton” algorithm with the aim of checking whether the algorithm influenced the results. The influence of the number of nodes was also analyzed so that the four models with “levmar” consisted of 3, 5, 7 and 10 nodes, respectively, while the ”quasi-Newton” models had three and seven nodes. The result shows (Table 14) that the misclassification rate was similar in all models and that the algorithm did not influence the results, so the “levmar” algorithm was selected. In addition, it was observed that there was no model that was strictly better than the rest.
  • In the third exploration, a training test was repeated 10 times with the four best models obtained: set of variables A, “levmar” algorithm and nodes 3, 7, 10 and 12, respectively. The result (Table 15) shows that the best models were those of three and seven nodes.
  • Finally, in order to determine the best model, a box-plot diagram of the MSE of the models was done. The result shows (Figure 1) the diagrams for the models 10, 3, 7 and 12 nodes (in this order). The smallest errors appeared in the models with 10 and three nodes. However, the dispersion was greater in the first case. Comparing the models with three and seven nodes, it was observed that the model with three nodes had the smallest error, both in mean and variance. Therefore, the best model was obtained with the set of variables A, activation function “tanh,” algorithm “levmar” and a total of three nodes in the hidden layer.

4.3. Random Forest

In this algorithm, the dataset with missing values was used since it efficiently handled this type of data. Models were constructed by repeated cross-validation with various seeds in order to calculate the failure rate from the three sets of variables. The result is represented with a box-plot diagram.
For set A two models were created, one with 200 iterations and maximum depth of tree 50, and another with 50 iterations and maximum depth of tree 10. For set B, two models were created with the same parameters used for the set A. In addition, for set C only a single model was created (with 200 iterations and maximum depth of 50) due to the large number of variables. The diagram of result (Figure 2) shows that the rate had the same mean and distribution in all the models, therefore it was considered that all of them worked equally. For this reason, the simplest model was chosen as the best model. The model was the set of variables A (pathology2, reason_discharge2 and reason_discharge5) with 50 iterations, maximum depth of 10 and misclassification rate of 0.043.

4.4. Gradient Boosting

In this algorithm, the dataset with missing values was used (since it efficiently handled this type of data) and the failure rate obtained is represented with a box-plot diagram. The processing was carried out as follows:
  • First, a model was created for each dataset with the following configurations: for the set of variables A with 50 iterations a regularization constant of 0.2 was used; for the set B with 150 iterations a regularization constant of 0.1 was used; and for the set C with 250 iterations a regularization constant of 0.01 was used. The maximum depth of the three models was 2. The diagram (Figure 3) of results shows that the model with the highest mean was the set of variables B. The set of variables A and C had the same mean but different variance, with the set of variables A as the best of the three. Thus, the set of variables B was discarded.
  • Next, four models were created: two with variables A (one with 50 iterations and a regularization constant of 0.2, and another with 250 iterations and regularization constant of 0.01), and the other two with variables C (in the same way). The diagram of the results (Figure 4) shows that there were three models with the same mean. However, the models of the set of variables A had the least variance, so the set of variables C was discarded.
  • Next, four models were created with the set of variables A, varying the parameters corresponding to the iterations, the regularization constant and the maximum depth. The diagram of the results (Figure 5) shows that models were not influenced by the parameters, so the best model was the simplest.
Thus, the best model was obtained using the set of variables A (pathology2, reason_discharge2 and reason_discharge5) with parameters of 50 iterations, a regularization constant of 0.2 and maximum depth of 10.

4.5. Assemble

The assemblies were done using the best models obtained from each technique with missing and imputed datasets depending on each technique, assembling the techniques two by two, three by three and even four. The result shows (Table 16) that the misclassification rate and the AUC were the same in all cases, so the statistic to discriminate was the MSE. The lowest index was obtained with the assembly of regression and neural network followed by the assemblies of neural network and gradient boosting.

5. Discussions

The constructed models can be compared to analyze which best predicts the target variable. For this, Table 17 has been constructed which shows for each model studied (logistic regression, neural networks, random forest, and gradient boosting and model assembly) the misclassification rate, the MSE and the AUC.
The misclassification rate is the same for all models, so it is necessary to use the rest of the statistics to obtain a conclusion. If the AUC is considered, it is observed that the random forest and gradient boosting models should be discarded since they present the smallest values. Then, for the remaining models, the MSE is used to compare them. Therefore, it is observed that the model with the lowest value corresponds to the model of neural networks.
In order to validate this result, a cross validation was carried out, rebuilding the models and analyzing the results. In this sense, the same results were obtained. This may be due to two factors: an overfit is occurring or the sample is very homogeneous. To study if there is an overfit, the results obtained in the training and test sets were considered with the aim of verifying if the training results were very good (overfit) and if the test the results worsened significantly. Table 18 shows the results obtained and as it can be observed, there was no data overfit (the results are numerically very similar). Therefore, it can be concluded that the cause of the results being so similar in the models is because the dataset was very homogeneous.
The result of this research shows that the model that performs best is the one based on a neural network with activation function “tanh,” algorithm “levmar” and three nodes in the hidden layer. This is consistent with the results obtained by other authors previously cited in the introduction [36,37,39,42]. It also allows us to deduce that the phenomenon to be modeled corresponds to a non-linear model. This explains the best behavior of neural networks (they model nonlinear phenomena quite well). In this sense, it is very likely that the use of more advanced neural networks and a greater number of layers will allow us to obtain models that are closer to reality.
Another aspect of the research is the variables that explain the phenomenon. According to the results, the target variable could be explained based on the values of the dummy pathology2, reason_discharge2 and reason_discharge5 variables. The variable pathology2 is a dummy variable that represents whether a patient’s illness is related to general medicine. The reason_discharge2 variable is a dummy variable that represents the reason for the patient’s discharge from hospital. Finally, the variable reason_discharge5 is a dummy variable that represents the reason for the discharge of a patient that has left. In this sense, the result would indicate that the main reasons why a patient would be returning to the emergency department would depend on whether he has been treated for a general medicine problem or if the cause of discharge is due to hospitalization in the ward of the patient or to the evasion of the patient. Compared with the results of other studies [24], the results coincide with respect to the disease variable (although the same does not occur with the variables referred to medical discharge). Regarding the disease, other studies describe specific diseases [27,28,29] that influence return such as renal colic, spondiolysis or headache. In this sense, the result indicating “general medicine” diseases would be consistent, also taking into account that the possible groups that appear in the data (general medicine, traumatology, gynecology, ophthalmology, general pediatrics, obstetrics, pediatric trauma). It is very likely that patients with renal colic are classified in “general medicine,” just as in the case of headache. Therefore, the analysis carried out complements other works showing that in addition to the disease, another cause that influences return is the cause of the medical discharge.
Regarding the quality of the results, as shown, the differences between the models are minimal and the reason is not due to an overfit, but to the homogeneity of the samples. The explanation for this situation is due to the state of the data that has been used. Although the initial dataset has important dimensions (period between June 2015 and February 2018 with a total of 143,803 emergencies, of which 6209 returned in less than 72 h after discharge), they could not all be used for problems such as missing values or wrong data. For this reason, the results could be refined if any of the variables could be corrected. Likewise, variable selection methods could be improved using feature selection techniques.

6. Conclusions and Future Work

This article has carried out an analysis on the phenomenon of the return of patients to the emergency department of a hospital in less than 72 h. For this, the prediction of the target binary variable of the patient’s return has been studied using various machine learning algorithms with the aim of obtaining several models for the phenomenon studied and fixing the sets of variables that best explain it.
It has been verified that the neural network model with activation function “tanh,” algorithm “levmar” and three nodes in the hidden layer shows a better behavior than the rest of the studied models (since it presents a lower MSE than the rest of the models and a better AUC). In addition, the set of variables that best explain the phenomenon are pathology2 (corresponding to general medicine), reason_discharge2 (hospitalization of the plant) and reason_discharge5 (evasion). This result is consistent with what is stated in the studies of other authors about the non-linear nature of the phenomenon studied (since neural networks generally model phenomena that have non-linear behavior quite well).
On the other hand, it has been observed that the differences in the values of the statistics of the results obtained show very similar behaviors with the sets of variables used (this is because the results obtained are strongly influenced by the training sets and proof used). The explanation for this fact lies in the impossibility of having used all the variables available in the dataset due to the existence of erroneous data or missing data and the variable selection method used. This results in the fit of the data not being as good as it should be, and does not show a clearly winning model.
As future lines of work, several are proposed. First, analyze the sensitivity of the results according to the size of the source set. It may be valuable to other researchers and developers as it will provide them with a solid basis for determining the required size of the dataset. Second, the repetition of the study using feature selection techniques [42] to improve the selection of variables is needed. Third, use of other models of machine learning such as deep learning algorithms are needed since the results obtained in this study suggest that more sophisticated neural network models could better explain the studied phenomenon.

Funding

This work has been supported by the Research Project CetrO+Spec (TIN2017-88092-R).

Acknowledgments

I would like to thank Eva Quintans for her participation in this work.

Conflicts of Interest

The author declares no conflict of interest.

Appendix A

The following tables describe the variables to be considered in the study, indicating their name, description, type and groups, if any. The type of a variable can be variables of type numeric, categorical or nominal free field.
Table A1. Nominal free field variables.
Table A1. Nominal free field variables.
NameDescription
commentTriage Nurse Free Text
clinical_judgmentFree field clinical opinion
Table A2. Integer variables.
Table A2. Integer variables.
NameDescription
admission_dateDate and time of the emergency admission
ageAge
blood_glucoseBlood glucose level collected in triage
cardiac_frequencyHeart rate
consultation_dateDate of consultation
discharge_dateDate and time of discharge
discharge_medical_dateDate and time of medical discharge (precedes “discharge_date”)
discharge_medical_timeTotal time to discharge
discharge_min_timeTime until administrative discharge (occurs after “discharge_medical_time”)
emergency_dateDate and time of the patient’s entry to the emergency department
emergency_min_timeTime it takes for a patient to go into an emergency state
evePain scale collected in triage
first_date_consultationDate and time of the first medical attention
first_date_sol_labFirst date of request to the laboratory
first_date_sol_radFirst date of request to radiology
glasgowScale that assesses the level of consciousness, collected in triage
observation_min_timeWait for admission under observation
new_triageThe system performs the triage again if the patient changes the clinical situation
press_arterial_maxMaximum blood pressure
press_arterial_minMinimum blood pressure
query_min_timeWaiting for first consultation
reconsultation_last_yearNumber of visits to the emergency department in the last year
saturation_O2Oxygen saturation collected in triage
short_treatment_min_timeWait until admission to the short treatment room
temperatureTemperature collected in triage
triage_dateDate and time recorded in triage room
triage_min_timeWaiting for triage
Table A3. Categorical variables.
Table A3. Categorical variables.
NameDescriptionGroups
adequacy_consultationAdequacy consultation5 groups: D1(adequate derivation), D2(reasonable derivation, but could have been avoided), D3(not suitable), IP1(it is appropriate that you have gone to the emergency room), IP3(unsuitable for having gone to the emergency room)
bed_observation_areaConcrete bed of the observation area 24 groups
bed_short_treatmentConcrete bed of the short treatment area22 groups
current_status_successIndicates if the patient has died2 groups: Yes, No(Empty)
destinationDetailed description of the reason for discharge25 groups
diagnostic_groupICD-9 based diagnostic groupMany groups
diagnosis _mainMain diagnosis based on ICD-9Many groups
doctor_dischargeDoctor discharging the patientMany groups
doctor_familyPatient’s Family PhysicianMany groups
emergency_revisionReferral to specialized consultation from the emergency department25 groups
entityEntity that insures the patientMany groups
first_doctor_assignedFirst doctor assignedMany groups
first_doctor_consultationFirst doctor with whom the consultation is heldMany groups
iccae_snIt has a continuity of care report2 groups: Yes, No(Empty)
incidentsIncidents2 groups: Yes, No(Empty)
interconsultationInterconsultation2 groups: Yes, No(Empty)
level_triageTriage level5 groups:1(Emergency),2(non-delayed urgency),3 (Delay urgency),4(No urgency), 5(Administrative reason)
locationLocationMany groups
medical_reconciliationIt is assessed at discharge from the patient’s baseline treatment3 groups: 0 (not reconciled), 1 (has been reconciled) or Empty (other cases).
nhcPatient history number---
pathologyPathology7 groups: General medicine, Traumatology, Gynecology,
Ophthalmology,
General, Pediatrics,
Obstetrics, Pediatric trauma
proceduresProcedures performed based on the healthcare catalog
processesAssigned process based on healthcare catalogMany groups
reason_consultationReason for the consultation (registered in triage)Many groups
reason_dischargeReason for discharge15 groups
reason_entryReason for admission16 groups
return_72Number of consults after 72 h after discharge (target variable)---
sexSex4 groups: F(female),M(male), I(Indeterminate),U(unknown)
support_idUnique identifier for each patient’s assistance (ID)--
surgical_interventionSurgical intervention2 groups: Yes, No(Empty)
transfusionsReceive transfusion2 groups: Yes, No(Empty)
transportGo to the emergency department by transport2 groups: Yes, No(Empty)
type_transport_incomeMeans of income transportation5 groups: Own media, assisted ambulance, collective ambulance, individual ambulance, taxi

References

  1. Alonso Martínez, J.L.; Llorente Díez, B.; Echegaray Agara, M.; Echezarreta, U.; González Arencibia, C. Reingreso hospitalario en medicina interna. An. de Med. Interna 2001, 18, 28–34. [Google Scholar] [CrossRef] [Green Version]
  2. Sabbatini, A.K.; Kocher, K.E.; Basu, A.; Hsia, R.Y. In-hospital outcomes and costs among patients hospitalized during a return visit to the emergency department. JAMA 2016, 315, 663–671. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  3. Grupo de Trabajo SEMES-Insalud. Calidad en los servicios de urgencias. Indicadores de calidad. Emergencias 2001, 13, 60–65. [Google Scholar]
  4. Shy, B.D.; Loo, G.T.; Lowry, T.; Kim, E.Y.; Hwang, U.; Richardson, L.D.; Shapiro, J.S. Bouncing back elsewhere: Multilevel analysis of return visits to the same or a different hospital after initial emergency department presentation. Ann. Emerg. Med. 2018, 71, 555–563. [Google Scholar] [CrossRef]
  5. Wu, C.L.; Wang, F.T.; Chiang, Y.C.; Chiu, Y.F.; Lin, T.G.; Fu, L.F.; Tsai, T.L. Unplanned emergency department revisits within 72 hours to a secondary teaching referral hospital in Taiwan. J. Emerg. Med. 2010, 38, 512–517. [Google Scholar] [CrossRef]
  6. Livieris, I.E.; Kotsilieris, T.; Dimopoulos, I.; Pintelas, P. Decision Support Software for Forecasting Patient’s Length of Stay. Algorithms 2018, 11, 199. [Google Scholar] [CrossRef] [Green Version]
  7. Cheng, J.; Shroff, A.; Khan, N.; Jain, S. Emergency department return visits resulting in admission: Do they reflect quality of care? Am. J. Med Qual. 2016, 31, 541–551. [Google Scholar] [CrossRef]
  8. García Ortega, C.; Almenara Barrios, J.; Ortega, G.; Javier, J. Tasa de reingresos de un hospital comarcal. Rev. Española de Salud Pública 1998, 72, 103–110. [Google Scholar]
  9. Núñez, S.; Martínez Sanz, R.; Ojeda, E.; Aguirre-Jaime, A. Perfil clínico-asistencial e impacto del retorno inesperado a urgencias de un mayor de 65 años. An. del Sist. Sanit. de Navar. 2006, 29, 199–205. [Google Scholar] [CrossRef] [Green Version]
  10. Instituto para el Desarrollo e Integración de la Sanidad. Estudio RESA 2017: Seis años midiendo resultados en salud de la Sanidad. 2017. Available online: https://www.fundacionidis.com/es/informes/estudio-resa-2017 (accessed on 20 April 2020).
  11. Gabayan, G.Z.; Asch, S.M.; Hsia, R.Y.; Zingmond, D.; Liang, L.J.; Han, W.; Sun, B.C. Factors associated with short-term bounce-back admissions after emergency department discharge. Ann. Emerg. Med. 2013, 62, 136–144. [Google Scholar] [CrossRef] [Green Version]
  12. Shy, B.D.; Shapiro, J.S.; Shearer, P.L.; Genes, N.G.; Clesca, C.F.; Strayer, R.J.; Richardson, L.D. A conceptual framework for improved analyses of 72-hour return cases. Am. J. Emerg. Med. 2015, 33, 104–107. [Google Scholar] [CrossRef] [PubMed]
  13. Keith, K.D.; Bocka, J.J.; Kobernick, M.S.; Krome, R.L.; Ross, M.A. Emergency department revisits. Ann. Emerg. Med. 1989, 18, 964–968. [Google Scholar] [CrossRef]
  14. Abualenain, J.; Frohna, W.J.; Smith, M.; Pipkin, M.; Webb, C.; Milzman, D.; Pines, J.M. The prevalence of quality issues and adverse outcomes among 72-hour return admissions in the emergency department. J. Emerg. Med. 2013, 45, 281–288. [Google Scholar] [CrossRef]
  15. Pellicer, J. Retornos al Servicio de Urgencias. Emergencias 1991, 3, 298–300. [Google Scholar]
  16. Sauvin, G.; Freund, Y.; Saïdi, K.; Riou, B.; Hausfater, P. Correction: Unscheduled return visits to the emergency department: Consequences for triage. Acad. Emerg. Med. 2013, 20, E3–E9. [Google Scholar] [CrossRef]
  17. Rising, K.L.; Victor, T.W.; Hollander, J.E.; Carr, B.G. Patient returns to the emergency department: The time-to-return curve. Academic Emergency Medicine. Off. J. Soc. Acad. Emerg. Med. 2014, 21, 864–871. [Google Scholar] [CrossRef]
  18. Rising, K.L.; Padrez, K.A.; O’Brien, M.; Hollander, J.E.; Carr, B.G.; Shea, J.A. Return visits to the emergency department: The patient perspective. Ann. Emerg. Med. 2015, 65, 377–386. [Google Scholar] [CrossRef]
  19. Martin-Gill, C.; Reiser, R.C. Risk factors for 72-hour admission to the ED. Am. J. Emerg. Med. 2004, 22, 448–453. [Google Scholar] [CrossRef] [PubMed]
  20. Gordon, J.A.; An, L.C.; Hayward, R.A.; Williams, B.C. Initial emergency department diagnosis and return visits: Risk versus perception. Ann. Emerg. Med. 1998, 32, 569–573. [Google Scholar] [CrossRef]
  21. Pham, J.C.; Kirsch, T.D.; Hill, P.M.; DeRuggerio, K.; Hoffmann, B. Seventy-two-hour returns may not be a good indicator of safety in the emergency department: A national study. Acad. Emerg. Med. 2011, 18, 390–397. [Google Scholar] [CrossRef]
  22. Pierce, J.M.; Kellerman, A.L.; Oster, C. “Bounces”: An analysis of short-term return visits to a public hospital emergency department. Ann. Emerg. Med. 1990, 19, 752–757. [Google Scholar] [CrossRef]
  23. Hu, S.C. Analysis of patient revisits to the emergency department. Am. J. Emerg. Med. 1992, 10, 366–370. [Google Scholar] [CrossRef]
  24. Poole, S.; Grannis, S.; Shah, N.H. Predicting emergency department visits. Amia Summits Transl. Sci. Proc. 2016, 2016, 438. [Google Scholar] [PubMed]
  25. Van der Linden, M.C.; Lindeboom, R.; de Haan, R.; van der Linden, N.; de Deckere, E.R.; Lucas, C.; Goslings, J.C. Unscheduled return visits to a Dutch inner-city emergency department. Int. J. Emerg. Med. 2014, 7, 23. [Google Scholar] [CrossRef] [Green Version]
  26. Hocagil, A.C.; Hocagil, H.; Bildik, F.; Kılıçaslan, İ.; Karabulut, H.; Keleş, A.; Demircan, A. Evaluating unscheduled readmission to emergency department in the early period. Balk. Med. J. 2016, 33, 72–79. [Google Scholar] [CrossRef]
  27. Nunez, S.; Hexdall, A.; Aguirre-Jaime, A. Unscheduled returns to the emergency department: An outcome of medical errors? BMJ Qual. Saf. 2006, 15, 102–108. [Google Scholar] [CrossRef] [Green Version]
  28. Imsuwan, I. Characteristics of unscheduled emergency department return visit patients within 48 hours in Thammasat University Hospital. J. Med. Assoc. Thai. 2011, 94, S73–S80. [Google Scholar]
  29. Han, C.Y.; Chen, L.C.; Barnard, A.; Lin, C.C.; Hsiao, Y.C.; Liu, H.E.; Chang, W. Early revisit to the emergency department: An integrative review. J. Emerg. Nurs. 2015, 41, 285–295. [Google Scholar] [CrossRef]
  30. Puente, A.J.; del Río Mata, J.; Huertas, J.L.A.; Ordóñez, M.B.M.; de Haro, M.L.N.; Blanquer, A.L.; del Campo, M.M. Causas de los retornos durante las 72 horas siguientes al alta de urgencias. Emerg. Rev. De La Soc. Española de Med. de Urgenc. Y Emerg. 2015, 27, 287–293. [Google Scholar]
  31. Moss, J.E.; Houghton, L.M.; Flower, C.L.; Moss, D.L.; Nielsen, D.A.; Taylor, D.M. A multidisciplinary care coordination team improves emergency department discharge planning practice. Med. J. Aust. 2002, 177, 427–439. [Google Scholar] [CrossRef]
  32. Taylor, R.A.; Pare, J.R.; Venkatesh, A.K.; Mowafi, H.; Melnick, E.R.; Fleischman, W.; Hall, M.K. Prediction of in-hospital mortality in emergency department patients with sepsis: A local big data–driven, machine learning approach. Acad. Emerg. Med. 2016, 23, 269–278. [Google Scholar] [CrossRef] [Green Version]
  33. Hao, S.; Jin, B.O.; Shin, A.Y.; Zhao, Y.; Zhu, C.; Li, Z.; Zhao, Y. Risk prediction of emergency department revisit 30 days post discharge: A prospective study. PLoS ONE 2014, 9, e112944. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  34. Pellerin, G.; Gao, K.; Kaminsky, L. Predicting 72-hour emergency department revisits. Am. J. Emerg. Med. 2018, 36, 420–424. [Google Scholar] [CrossRef] [PubMed]
  35. Lee, E.K.; Yuan, F.; Hirsh, D.A.; Mallory, M.D.; Simon, H.K. A clinical decision tool for predicting patient care characteristics: Patients returning within 72 hours in the emergency department. AMIA Annu. Symp. Proc. 2012, 2012, 495. [Google Scholar]
  36. Hong, W.S.; Haimovich, A.D.; Taylor, R.A. Predicting hospital admission at emergency department triage using machine learning. PLoS ONE 2018, 13, e0201016. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  37. Frost, D.W.; Vembu, S.; Wang, J.; Tu, K.; Morris, Q.; Abrams, H.B. Using the electronic medical record to identify patients at high risk for frequent emergency department visits and high system costs. Am. J. Med. 2017, 130, 601-e17. [Google Scholar] [CrossRef] [Green Version]
  38. Harrell, F.E. Ordinal logistic regression. In Regression Modeling Strategies; Springer: Berlin/Heidelberg, Germany, 2015; pp. 311–325. [Google Scholar]
  39. Hassoun, M.H. Fundamentals of Artificial Neural Networks; MIT Press: Cambridge, MA, USA, 1995. [Google Scholar]
  40. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Green Version]
  41. Friedman, J.H. Greedy function approximation: A gradient boosting machine. Ann. Stat. 2001, 1189–1232. [Google Scholar] [CrossRef]
  42. Cadenas, J.M.; Garrido, M.C.; Daz-Valladares, R.A. Mejorando el comportamiento de ensambles basados en boosting, bagging y random forest mediante Soft computing. Proc. Novena Conf. Iberoam. En Sist. Cibernética e Inf. 2010, 1–10. [Google Scholar]
Figure 1. Box plot of the mean square error in neural network models.
Figure 1. Box plot of the mean square error in neural network models.
Jpm 10 00081 g001
Figure 2. Box plot of the misclassification rate in random forest models.
Figure 2. Box plot of the misclassification rate in random forest models.
Jpm 10 00081 g002
Figure 3. Box plot of the misclassification rate in gradient boosting models with sets of variables A, B and C.
Figure 3. Box plot of the misclassification rate in gradient boosting models with sets of variables A, B and C.
Jpm 10 00081 g003
Figure 4. Box plot of the misclassification rate in gradient boosting models with sets of variables A and B.
Figure 4. Box plot of the misclassification rate in gradient boosting models with sets of variables A and B.
Jpm 10 00081 g004
Figure 5. Box plot of the misclassification rate in gradient boosting models with sets of variables A.
Figure 5. Box plot of the misclassification rate in gradient boosting models with sets of variables A.
Jpm 10 00081 g005
Table 1. Descriptive analysis of the interval variables.
Table 1. Descriptive analysis of the interval variables.
NameMeMissTotalMinMaxσSkewnessKurtosis
age456143,7970184924.882.63190.76
blood_glucose114136,52072834060079.432.708.44
cardiac_frequency8395,54048,263025020.310.992.33
discharge_medical_time1570143,803−135618,010319.4419.71197.28
discharge_min_time1600143,803−135618,010332.7199.05172.70
emergency_min_time1140,455334802255.9322.19731.63
eve683,14860,6550101.79−0.651.16
glasgow15136,91868853150.58−14.16228.59
new_triage10143,803020.17−5.2227.41
observation_min_time88139,5634240−32283212.3182.7312.06
press_arterial_max136100,22143,5825327025.170.510.61
press_arterial_min80100,25943,544015015.250.120.75
query_min_time412783141,020−36801553.0547.365.229.93
saturation_0298111,87431,92901004.55−8.85136.15
short_treatment_min_time154134,094970903287264.9832.367.80
temperature37.1123,66420,1393341.51.030.670.14
triage_min_time44003139,800−55414312.57265.9685,255.86
Table 2. Description categorical variables.
Table 2. Description categorical variables.
VariableTypeLevelsMissing
adequacy_consultationC5142,730
bed_observation_areaN24139,563
bed_short_treatmentN22134,094
current_status_successC20
destinationC2525,190
emergency_revisionC25124,483
iccae_snC1139,863
incidentsC1125,221
interconsultationC1143,063
level_triageN54388
medical_reconciliationN28349
pathologyC74388
reason_dischargeC150
reason_entryC160
sexC40
surgical_interventionC1143,202
transfusionsC1142,892
transportC1138,738
type_transport_incomeC5738
Table 3. Variable interval modifications.
Table 3. Variable interval modifications.
VariableOld ValueNew Value
age0–18490–110
cardiac_frequency0–25030–230
discharge_medical_timemin = −1356min = 0
discharge_min_timemin = −1356min = 0
observation_min_timemin = −3min = 0
query_min_timemin = −36min = 0
time_triage_minmin = −55min = 0
Table 4. Categorical Variable Modifications.
Table 4. Categorical Variable Modifications.
VariableOld CategoriesNew Categories
destination25 groups4 groups: hospitalization, home, transfer and SHARE program
emergency_revision25 groups12 groups: rehabilitation, traumatology, ophthalmology, locomotor system, gynecology, ENT, internal medicine, cardiology, surgery, urology, digestive, pulmonology
iccae_snYes / EmptyEmpty category becomes “No”
incidentsYes / EmptyEmpty category becomes “No”
interconsultationYes / EmptyEmpty category becomes “No”
pathology7 groups6 groups: general medicine, traumatology, gynecology, ophthalmology, general pediatrics, pediatric traumatology
reason_discharge15 groups7 groups: voluntary discharge, at home, to hospitalization, recovery or improvement, evasion, transfer and others
reason_entry16 groups5 groups: accident, health center referral, own initiative, others and emergencies
sex4 groups2 groups: F and M
surgical_interventionYes / EmptyEmpty category becomes “No”
transfusionsYes / EmptyEmpty category becomes “No”
transportYes / EmptyEmpty category becomes “No”
type_transport_income5 groups3 groups: own resources, ambulance and taxi
Table 5. Variable interval modifications.
Table 5. Variable interval modifications.
VariableOld ScaleNew Scale
bed_observation_area24 groupsBinary (1 = has occupied bed; 2 = has not occupied bed)
bed_short_treatment22 groupsBinary (1 = has occupied bed; 2 = has not occupied bed)
return_727 groupsBinary (1,2,3,4,5,6 = 1; 0 = 0)
Table 6. Variable interval modifications.
Table 6. Variable interval modifications.
VariableMissing ValuesEliminated
adequacy_consultation142,730Yes
age18No
blood_glucose136,520Yes
cardiac_frequency95,581Yes
destination25,190No
discharge_medical_time57No
discharge_min_time80No
emergency_min_time140,455Yes
emergency_revision124,483Yes
eve83,148Yes
glasgow136,918Yes
level_triage4388No
medical_reconciliation8349No
observation_min_time139,582Yes
pathology4388No
press_arterial_max100,221Yes
press_arterial_min100,259Yes
query_min_time2784No
saturation_O211,874Yes
sex35No
short_treatment_min_time134,094Yes
temperature123,664Yes
triage_min_time4005No
type_transport_income738No
Table 7. Selection of imputed data.
Table 7. Selection of imputed data.
MethodVariables
R-squarelevel_triage2, level_triage4, level_triage5, pathology2 reason_discharge2, reason_discharge5
Partial least squarespathology2, pathology5 reason_discharge2, reason_discharge5
“step by step” regression logisticcurrent_status_success, medical_reconciliation, sex, discharge_min_time, query_min_time, iccae_sn, incidents, level_triage2, level_triage3, level_triage5, surgical_intervention, transfusions, transport, type_transport_income2, pathology2, pathology5, pathology6, reason_entry3, destination3, destination5, reason_discharge2, reason_discharge3, reason_discharge5 reason_discharge6
Table 8. Selection of missing data.
Table 8. Selection of missing data.
MethodVariables
R-squaremedical_reconciliation, level_triage2, level_triage3, transport, reason_discharge2, reason_discharge5, pathology2
Partial least squarespathology2, reason_discharge2, reason_discharge5
Decision treedischarge_medical_time, level_triage2, reason_entry2, reason_discharge5,
Table 9. Set of variables defined.
Table 9. Set of variables defined.
DatasetSet ASet BSet C
Imputationpathology2, reason_discharge2 and reason_discharge5pathology2, pathology5, reason_discharge2, reason_discharge5, level_triage2 and level_triage5Total variables: 50
Missing valuespathology2, reason_discharge2 and reason_discharge5pathology2, reason_discharge2, reason_discharge5, level_triage2, reason_entry2, discharge_medical_timeTotal variables: 50
Table 10. Initial comparison of logistic regression models.
Table 10. Initial comparison of logistic regression models.
ModelMisclassification RateAICSBCMSEAUC
Regression A “backward”0.04334,892.5234,930.600.0410.6
Regression A “forward”0.04335,811.9535,821.470.0410.5
Regression A “step by step”0.04335,811.9535,821.470.0410.5
Regression B “backward”0.04334,655.3934,722.030.0410.6
Regression B “forward”0.04335,811.9535,821.470.0410.5
Regression B “step by step”0.04335,811.9535,821.470.0410.5
Regression C “backward”0.04334,158.0434,415.070.0490.7
Regression C “forward”0.04335,811.9535,821.470.0410.5
Regression C “step by step”0.04335,811.9535,821.470.0410.5
Table 11. First iterations of training test of the best regression models.
Table 11. First iterations of training test of the best regression models.
ModelMisclassification RateAICSBCMSEAUC
Regression A-Iter 10.0953363.503376.690.0860.53
Regression B-Iter 10.0953364.323377.500.0860.52
Regression C-Iter 10.0953364.323377.500.0860.52
Regression A-Iter 20.0591634.911644.340.0550.52
Regression B-Iter 20.0591635.531647.960.0550.52
Regression C-Iter 20.0591635.531647.960.0550.52
Regression A-Iter 30.0541542.781555.220.0510.52
Regression B-Iter 30.0541543.971562.630.0510.52
Regression C-Iter 30.0541543.971562.630.0510.52
Regression A-Iter 40.0531483.121495.500.0500.52
Regression B-Iter 40.0531484.761503.320.0500.52
Regression C-ter 40.0531484.761503.320.0500.52
Table 12. Final regression model test.
Table 12. Final regression model test.
Independent Terms OnlyIndependent Terms & CovariatesLikelihood Ratio Chi-SquareDFPr > ChiSq
35809.9534884.52925.433<0.0001
Table 13. Initial comparison of neural network models.
Table 13. Initial comparison of neural network models.
ModelMisclassification RateAIC SBCMSEAUC
NN.A.L30.043318.68509.070.400.5
NN.A.B30.043318.68509.070.400.5
NN.A.L70.043225.82644.680.410.6
NN.A.B70.043225.82644.680.410.6
NN.B.L30.043336.68612.750.400.5
NN.B.B30.043336.68612.750.400.5
NN.B.B70.043408.681027.450.400.5
NN.B.L70.043408.681027.450.400.5
NN.C.B3-979.582510.40--
NN.C.L3-979.582510.40--
NN.C.B7-974.874520.43--
NN.C.L7-974.874520.43--
Table 14. Second comparison of neural network models.
Table 14. Second comparison of neural network models.
ModelMisclassification RateAIC SBCMSEAUC
NN.A.L30.043318.68509.070.400.5
NN.A.L50.043342.68647.310.400.5
NN.A.L70.043225.82644.680.410.6
NN.A.L100.043271.01861.220.410.6
NN.A.Q30.043318.68509.070.400.5
NN.A.Q70.043225.82644.680.410.6
Table 15. First iterations of the training test of the best neural network models.
Table 15. First iterations of the training test of the best neural network models.
ModelMisclassification RateAICSBCMSEAUC
NN.A.L3-Iter10.04149.85173.610.420.5
NN.A.L7-Iter10.04196.61368.880.420.5
NN.A.L10-Iter10.041132.76516.430.410.5
NN.A.L12-Iter10.041156.02613.950.430.5
NN.A.L3-Iter20.04349.62172.670.420.5
NN.A.L7-Iter20.04395.83366.530.430.6
NN.A.L10-Iter20.043131.95513.380.430.5
NN.A.L12-Iter20.043155.89611.150.430.6
NN.A.L3-Iter30.04749.81172.940.420.5
NN.A.L7-Iter30.04796.75367.640.430.6
NN.A.L10-Iter30.047131.36513.060.430.5
NN.A.L12-Iter30.047156.04611.620.430.6
NN.A.L3-Iter40.04449.84173.260.420.5
NN.A.L7-Iter40.04496.01367.530.430.6
NN.A.L10-Iter40.044132.10514.710.430.5
NN.A.L12-Iter40.044156.03612.680.430.6
Table 16. Assembly results.
Table 16. Assembly results.
ModelMisclassification RateMSEAUC
Reg+NN0.0430.0400.61
NN+GB0.0430.0410.61
Reg+GB0.0430.0420.61
Reg+NN+GB0.0430.0410.61
NN+Reg+GB+RF0.043NaN0.6
Table 17. Model comparison.
Table 17. Model comparison.
ModelMisclassification RateMSEAUC
Reg 0.0430.0410.61
NN0.0430.0400.61
RF 0.0430.0420.50
GB 0.0430.0420.40
Reg+NN 0.0430.0410.61
NN+GB 0.0430.0410.61
Reg+GB 0.0430.0420.61
Reg+NN+GB 0.0430.0410.61
Table 18. Results for training and test sets.
Table 18. Results for training and test sets.
TrainingTest
ModelMisclassification RateMSEAUCMisclassification RateMSEAUC
Reg0.0430.0410.610.0430.0410.61
NN0.0430.040.610.0430.0410.61
RF0.0430.040.620.0430.0410.6
GB0.0430.0410.50.0430.0410.5
Reg+NN0.0430.040.610.0430.0410.61
NN+GB0.0430.0410.610.0430.0410.61
Reg+GB0.0430.0410.610.0430.0410.61
Reg+NN+GB0.0430.0410.610.0430.0410.61

Share and Cite

MDPI and ACS Style

Sarasa Cabezuelo, A. Application of Machine Learning Techniques to Analyze Patient Returns to the Emergency Department. J. Pers. Med. 2020, 10, 81. https://doi.org/10.3390/jpm10030081

AMA Style

Sarasa Cabezuelo A. Application of Machine Learning Techniques to Analyze Patient Returns to the Emergency Department. Journal of Personalized Medicine. 2020; 10(3):81. https://doi.org/10.3390/jpm10030081

Chicago/Turabian Style

Sarasa Cabezuelo, Antonio. 2020. "Application of Machine Learning Techniques to Analyze Patient Returns to the Emergency Department" Journal of Personalized Medicine 10, no. 3: 81. https://doi.org/10.3390/jpm10030081

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