# Automatic Surgery and Anesthesia Emergence Duration Prediction Using Artificial Neural Networks

Authors: Li Huang; Xiaomin Chen; Wenzhi Liu; Po-Chou Shih; Jiaxin Bao
Journal: Journal of Healthcare Engineering
 (2022)

---

## Abstract

Cost control is becoming increasingly important in hospital management. Hospital operating rooms have high resource consumption because they are a major part of a hospital. Thus, the optimal use of operating rooms can lead to high resource savings. However, because of the uncertainty of the operation procedures, it is difficult to arrange for the use of operating rooms in advance. In general, the durations of both surgery and anesthesia emergence determine the time requirements of operating rooms, and these durations are difficult to predict. In this study, we used an artiﬁcial neural network to construct a surgery and anesthesia emergence duration-prediction system. We propose an intelligent data preprocessing algorithm to balance and enhance the training dataset automatically. The experimental results indicate that the prediction accuracies of the proposed serial prediction systems are acceptable in comparison to separate systems.


---

## Body

## 1. Introduction

In recent years, cost savings have become critical in hospitals [1–3]. In addition to staff salaries, hospitals have to pay for equipment, materials, and administrative expenses. A conservative estimate of operating room utilization costs exceeded $15 per minute in 2012 [1]. However, in 2017, the estimate increased to $36 per minute [2]. The cost has always been an important optimization objective in operating room scheduling [3]. Therefore, cost control is a key factor for successful hospital management.The operating room is a core component of the hospital, and its use contributes considerably to hospital costs [4]. In general, surgeries require expensive resources, such as equipment, materials, energy, and medical staff [5]. In some hospitals, several operating rooms form a laminar flow operation center, in which the energy cost of using five operating rooms for one hour is almost the same as that of using one operating room for one hour. However, the energy cost of using one operating room for five hours is five times that of using five operating rooms for one hour. If the operating rooms are not optimally used, the cost is high. Hence, detailed operating room scheduling is required to ensure that all required resources are available at the right time.Therefore, a well-arranged operating room schedule can reduce costs. However, such a schedule is difficult to achieve, primarily because of the uncertainty in the operating room use duration [6], which is determined by surgery and anesthesia emergence durations. Surgery duration is defined as the time from the beginning to the end of surgery. Anesthesia emergence duration is the time from the end of the surgery to the time when the patient wakes up. Anesthesia emergence is relevant only in surgeries under general anesthesia. If the operating room schedule does not allocate sufficient time for an operation, the next operation cannot start on time. However, if the planned operation duration is longer than the actual duration, the operating room will be vacant, leading to a waste of resources. In extreme cases, operating rooms may remain open beyond their planned working hours, incurring costly overtime wages and energy consumption [7]. Similarly, an inaccurate estimate of the duration of anesthesia emergence can lead to poor surgical scheduling, resulting in resources wastage. In contrast, optimal scheduling can reduce the resource consumption that is caused by the difference between the estimated and the actual operating room use times.Previous studies have used several approaches to estimate surgery duration [8–17]. A common method is to assume the decisions of surgeons as the deciding factor. Surgeons make a rough estimate of the operating room use times based on the average duration of previous similar operations (previous experience), the type of surgery, patient characteristics, and other factors. [8]. They tend to avoid risks and have limited ability to estimate the duration of surgery [9]. Using this method, the case duration was overestimated by up to 32% or underestimated by 42% [10]. The second common approach is to use electronic health records (EHRs) to calculate a given case duration based on historical data [11]. Because EHR does not take into consideration factors, such as body mass index, anesthesia type, staff, and so on [12], its accuracy is modestly higher for ordinary patients [11] and greatly dependent on other factors. Another method is to simulate the case duration according to the concept of probability distribution. Commonly used probability distributions include the hypergamma, lognormal, gamma, and Weibull distributions [13]. This approach has often been used to describe the stochastic duration of surgery, however, its accuracy has not been reported in the literature. With the popularization of artificial intelligence, numerous statistical and machine-learning tools have been used to predict surgery durations. These methods include Bayesian methods [14], regression techniques [14–16], neural networks [14–16], and random forests [17]. For example, Devi et al. [14] established neural networks and regression models for three types of ophthalmic surgery studies (cataract, corneal transplant, and oculoplastic surgery). The predicted root mean square error was affected by the number of hidden layer neurons constructed by the model. Because of the different types of surgeries, the RMSE was 0.0656–0.6295. Based on the findings of reference [14], we conducted more in-depth experiments on the decision-making of prediction model architecture, including the number of hidden layers and the number of neurons in each hidden layer.Bartek et al. [15] used linear regression and supervised machine learning to create surgeon-specific models (92 individual models) and service-specific models (12 service-specific models). The prediction accuracies of the former were 32% to 39% and better than those of the latter. Shahabikargar et al. [17] employed the filtered random forest algorithm to predict the surgical duration. They filtered the data of 60,362 elective surgeries in two hospitals by deleting missing, inconsistent, and duplicate values before modeling. The overall prediction error decreased by 44% (mean absolute percentage error from 0.68 to 0.38%) compared to the error without data preprocessing. Therefore, for data preprocessing, we referred to the data cleaning operation in reference [17] and proposed an intelligent data preprocessing algorithm to improve the data quality.Tuwatananurak et al. [16] employed supervised learning to learn 990 effective surgical data within three months. The results showed a 7 min improvement in absolute difference between the predicted and actual case durations when compared to that obtained using conventional EHR. The method also resulted in a 70% reduction in overall scheduling inaccuracy. As hospitals seek more economical process arrangements, the patient's anesthesia recovery is being moved from the operating room to the postanesthesia care unit, resulting in the separation of anesthesia recovery time from operation time. Thus, these two must be predicted separately. To the best of our knowledge, no study has been reported on the prediction of anesthesia awakening time. Therefore, in this study, we constructed a serial artificial neural network (ANN) to predict the operation and anesthesia recovery time.Artificial intelligence has been recently adopted to various prediction problems and has resulted in good prediction performance. For example, an ANN was used to predict the recidivism of commuted prisoners [18] and solve the ship detection problem [19]. A support vector machine (SVM) was used to classify the reclaimed wafers into good and not good categories [20]. The driver lane-keeping ability in the fog problem was solved using an association rule [21]. The ANN has been used to solve various types of prediction problems and has better accuracy than SVM in supervised learning [20, 22]. Therefore, to predict the duration of surgery and anesthesia emergence more accurately for arranging the operating rooms more efficiently and effectively, ANN was used to construct the surgery duration prediction system in our previous study [23], and we used ANN to construct the anesthesia emergence duration prediction system in this study. The anesthesia emergence duration is affected by the surgery duration: the longer the surgery duration, the longer the anesthesia emergence duration. Thus, the former is an input variable for the anesthesia emergence duration prediction system. However, the actual surgery duration is unknown before the procedure is performed. Therefore, we, firstly, constructed two prediction systems: surgery duration and anesthesia emergence duration prediction systems, and then combined them to obtain the final prediction system. We used the predicted surgery duration as the input variable for the anesthesia emergence duration prediction system. According to the experimental results, the prediction accuracy of the final prediction system was 95.52%. Besides, we developed an intelligent data preprocessing algorithm to balance and enhance the dataset for the ANN. This algorithm automatically calculates the most appropriate replication time.The remainder of this paper is organized as follows: Section2 introduces the ANN, perceptron, and multilayer perceptron (MLP). Section 3 describes the experiments conducted and the data preprocessing algorithm. Section 4 discusses the experimental results of the three prediction systems: surgery duration, anesthesia emergence duration, and final prediction systems. Finally, the conclusions and suggestions for future research are presented in Section 5.


## 2. Review of the Artificial Neural Network

### 2.1. Artificial Neural Network

An ANN is a complex artificial system based on mathematical models based on the function, structure, and information processing of the human brain and nervous system [24, 25]. Similar to the human brain, an ANN is a self-learning system that learns to predict outputs by performing numerous iterations. All types of ANN nodes are akin to the neurons in the human brain, each of which is used as the input of the next node, after the weighting function [26, 27]. In the learning process, the weights are updated using a systematic algorithm. To obtain better output accuracy, the ANN often performs the backpropagation learning algorithm, i.e., it uses a certain set of weights and biases to perform an iteration, calculate the error with the output and actual value, propagate backwards, and update the weights and bias by the error to ensure that after several such forward and backward propagations, the output accuracy is high [28, 29]. After the ANN is trained, new data can be classified or predicted using the received stimulus (new input data), weights, and biases.The ANN is a powerful tool for learning and modeling complex linear or nonlinear relationships. To be more precise, the model it builds is similar to a “black box.” The nature of the relationship between the input and output data is unknown [30]. ANNs have been widely applied in a wide range of problems in multiple fields, including engineering [31, 32], biology, mathematics, and medicine, to analyze and predict various diseases [33].


### 2.2. Perceptron

The perceptron model was derived from the MP model established by McCulloch and Pitts [34]. By simulating the principles and processes of biological nerve cells, the MP model describes the mathematical theory and network structure of artificial neurons and proves that a single neuron can realize a logical function. The MP model contains input, output, and computation functions. The input and output are analogous to the dendrite and axon of a neuron, respectively, whereas the calculation is similar to the processing conducted in the nucleus, with each synapse being assigned a weight.Inspired by the MP model, the perceptron model consists of two layers. The first layer, called the input layer, receives the stimulus and passes it to the last layer. In the final layer, called the output layer, all input stimuli are multiplied with their respective weights, and the perceptron adds all the weighted stimuli and bias using the summation function. Finally, the perceptron uses an activation function to simulate data processing in the brain [35]. The basic network structure of a perceptron is shown in Figure 1.Figure 1
Basic structure of perceptron.


### 2.3. Multilayer Perceptron

To better handle nonlinear problems, Hecht-Nielsen proposed a multilayer perceptron by placing additional layers (s) of neurons between the input and output layers [35]. As shown in Figure 2, there are two fundamental components of the basic MLP structure: neurons and the links between neurons. The ni neurons are the processing elements, and the links are interconnections. Every link has a corresponding weight parameter wj or bias parameter bi. When a neuron receives stimuli from other neurons via links, it processes the information and produces an output. Moreover, these intermediate layers are assumed to not be disturbed by the external environment. Therefore, they are called hidden layers, and the nodes of hidden layers are called hidden nodes. Similar to the perceptron, the input neurons receive external stimuli, and the output neurons deliver the output. Using similar neuron dynamics, hidden neurons receive stimuli from neurons at the front of the network and relay the output to the neurons at the back of the network [18].Figure 2
Basic structure of MLP.


## 2.1. Artificial Neural Network

An ANN is a complex artificial system based on mathematical models based on the function, structure, and information processing of the human brain and nervous system [24, 25]. Similar to the human brain, an ANN is a self-learning system that learns to predict outputs by performing numerous iterations. All types of ANN nodes are akin to the neurons in the human brain, each of which is used as the input of the next node, after the weighting function [26, 27]. In the learning process, the weights are updated using a systematic algorithm. To obtain better output accuracy, the ANN often performs the backpropagation learning algorithm, i.e., it uses a certain set of weights and biases to perform an iteration, calculate the error with the output and actual value, propagate backwards, and update the weights and bias by the error to ensure that after several such forward and backward propagations, the output accuracy is high [28, 29]. After the ANN is trained, new data can be classified or predicted using the received stimulus (new input data), weights, and biases.The ANN is a powerful tool for learning and modeling complex linear or nonlinear relationships. To be more precise, the model it builds is similar to a “black box.” The nature of the relationship between the input and output data is unknown [30]. ANNs have been widely applied in a wide range of problems in multiple fields, including engineering [31, 32], biology, mathematics, and medicine, to analyze and predict various diseases [33].


## 2.2. Perceptron

The perceptron model was derived from the MP model established by McCulloch and Pitts [34]. By simulating the principles and processes of biological nerve cells, the MP model describes the mathematical theory and network structure of artificial neurons and proves that a single neuron can realize a logical function. The MP model contains input, output, and computation functions. The input and output are analogous to the dendrite and axon of a neuron, respectively, whereas the calculation is similar to the processing conducted in the nucleus, with each synapse being assigned a weight.Inspired by the MP model, the perceptron model consists of two layers. The first layer, called the input layer, receives the stimulus and passes it to the last layer. In the final layer, called the output layer, all input stimuli are multiplied with their respective weights, and the perceptron adds all the weighted stimuli and bias using the summation function. Finally, the perceptron uses an activation function to simulate data processing in the brain [35]. The basic network structure of a perceptron is shown in Figure 1.Figure 1
Basic structure of perceptron.


## 2.3. Multilayer Perceptron

To better handle nonlinear problems, Hecht-Nielsen proposed a multilayer perceptron by placing additional layers (s) of neurons between the input and output layers [35]. As shown in Figure 2, there are two fundamental components of the basic MLP structure: neurons and the links between neurons. The ni neurons are the processing elements, and the links are interconnections. Every link has a corresponding weight parameter wj or bias parameter bi. When a neuron receives stimuli from other neurons via links, it processes the information and produces an output. Moreover, these intermediate layers are assumed to not be disturbed by the external environment. Therefore, they are called hidden layers, and the nodes of hidden layers are called hidden nodes. Similar to the perceptron, the input neurons receive external stimuli, and the output neurons deliver the output. Using similar neuron dynamics, hidden neurons receive stimuli from neurons at the front of the network and relay the output to the neurons at the back of the network [18].Figure 2
Basic structure of MLP.


## 3. Experiments

### 3.1. Data Setting

Operational records collected between January 2019 and July 2020 from the Affiliated Hospital of Panzhihua University were used as samples in this study. The records were used only for academic purposes and were anonymized to protect privacy.In total, 15,754 samples were collected for this study. These samples were the data of patients without hepatic and renal diseases. To eliminate potential factors that could influence the operation time, all samples from emergency surgery patients or patients admitted to the intensive care unit after surgery were excluded. Thus, records from only patients with complete case data were included. Samples with all types of anesthesia were considered to predict the duration of surgery, whereas only samples under general anesthesia were considered to predict the duration of anesthesia emergence.To improve the prediction accuracy of the model, we collected the data available preoperatively and identified the influencing factors of surgery and anesthesia emergence durations as the input variables of the model through literature survey and physician interviews. The input and output variables of the surgery and anesthesia emergence duration prediction systems are presented in Tables1 and 2, respectively. In Table 1, the input variables are composed of three parts: basic patient information and preoperative physiological data (A1–A18), surgeon information (A20–A23), and operation information (A19 and A24). In Table 2, the input variables are composed of three parts: basic patient information and preoperative physiological data (A1–A18), anesthesiologist information (A20–A23), and operation information (A19 and A24). By comparing these tables, we observed that the 20th and 24th input variables of the two systems were different. Firstly, as mentioned in the data setting criteria, samples with both local and general anesthesia were used in the first system, whereas only samples with general anesthesia were used in the second system. Hence, they were subdivided into four types of general anesthesia. Furthermore, the duration of surgery was dependent on the surgeon, whereas the duration of anesthesia emergence was dependent on the anesthesiologist. Moreover, the surgical grade had a profound impact on the duration of surgery but a negligible effect on the duration of anesthesia emergence. Hence, it was ignored in the latter case. In summary, the duration of surgery may affect the duration of anesthesia emergence. Therefore, the output variable of the first system was used as the 24th input variable of the second system. Given that the duration of surgery was less than 4 h, all samples with a duration of less than 4 h were used to predict the duration of surgery. Given that most durations of anesthesia emergence are less than 1 h, all samples with a duration of less than 1 h were used to predict the duration of anesthesia emergence. Therefore, the last row of Table 1 shows that the surgery duration was divided into four scales: no more than one hour, 1 h to 2 h, 2 h to 3 h, and 3 h to 4 h. Similarly, the duration of anesthesia emergence was divided into four scales: no more than 15, 15 to 40, 40 to 50, and 50 to 60 min, as shown in the last row of Table 2.Table 1
Input and output variables of the surgery duration prediction system.
VariablesNameDescriptionInput1. GenderA1(1) Male(2) Female2. BMIA2Body mass index3. SBPA3Systolic blood pressure4. DBPA4Diastolic blood pressure5. PRA5Pulse rate6. RRA6Respiration rate7. TemperatureA7Body temperature8. Heart function classificationA8(1) I level(2) II level(3) III level9. RBCA9Red blood cell10. HBA10Hemoglobin11. HCTA11Hematocrit12. PLTA12Platelet13. KA13Potassium14. NAA14Sodium15. CLA15Chlorine16. APTTA16Activated partial thromboplastic time17. PTA17Prothrombin time18. TTA18Thrombin time19. American society of anesthesiologists (ASA) classificationA19(1) I level(2) II level(3) III level20. Anesthesia typeA20(1) Local anesthesia(2) General anesthesia21. Surgeon titleA21(1) Physician(2) Attending physician(3) Deputy chief physician(4) Chief physician22. Seniority of surgeonA22The working years of surgeon23. Age of surgeonA23—24. Surgical gradeA24(1) Small(2) Medium(3) Large(4) SuperOutput (original)Duration of surgeryT(1)≤1 hour(2) 1-2 hours(3) 2-3 hours(4) 3-4 hoursOutput (statistical)Duration of surgeryT(1) 1000(2) 0100(3) 0010(4) 0001Table 2
Input and output variables of the anesthesia emergence duration prediction system.
VariablesNameDescriptionInput1. GenderA1(1) Male(2) Female2. BMIA2Body mass index3. SBPA3Systolic blood pressure4. DBPA4Diastolic blood pressure5. PRA5Pulse rate6. RRA6Respiration rate7. TemperatureA7Body temperature8. Heart function classificationA8(1) I level(2) II level(3) III level9. RBCA9Red blood cell10. HBA10Hemoglobin11. HCTA11Hematocrit12. PLTA12Platelet13. KA13Potassium14. NAA14Sodium15. CLA15Chlorine16. APTTA16Activated partial thromboplastic time17. PTA17Prothrombin time18. TTA18Thrombin time19. American society of anesthesiologists (ASA) classificationA19(1) I level(2) II level(3) III level20. Anesthesia typeA20(1) Intravenous general anesthesia(2) Intravenous-inhalational balanced anesthesia(3) General anesthesia with block anesthesia(4) General anesthesia with intraspinal anesthesia21. Title of anesthesiologistA21(1) Physician(2) Attending physician(3) Deputy chief physician(4) Chief physician22. Seniority of anesthesiologistA22The working years of anesthesiologist23. Age of anesthesiologistA23—24. Duration of surgeryA24(1)≤1 hour(2) 1-2 hours(3) 2-3 hours(4) 3-4 hoursOutput (original)Duration of anesthesia emergenceT(1)≤15 minutes(2) 15–40 minutes(3) 40–50 minutes(4) 50–60 minutesOutput (statistical)Duration of anesthesia emergenceT(1) 1000(2) 0100(3) 0010(4) 0001The success of an ANN depends heavily on appropriate data preprocessing. Hence, all data in this study were preprocessed using data transformation [36], inspection [37], and exclusion of outliers. After data preprocessing, 6,507 and 5,790 surgery samples were retrospectively used to predict the durations of surgery and anesthesia emergence, respectively. In addition, normalizing the data is recommended to avoid gradient explosion and eliminate the influence of data heterogeneity, which can hinder the learning process [38]. All the data normalized ranged between 0.1 and 0.9. Moreover, balancing and enriching data are essential steps in solving classification problems [39]. We propose an intelligent data-preprocessing algorithm to balance and enhance the dataset. Thereafter, we divided the dataset into training, testing, and validation datasets. The most important process of this algorithm was data balancing. The purpose of data balancing is to reduce the differences in the amount of data in each category. Two examples of data balancing are shown in Figure 3. ni indicates the amount of data in category i, and nmax indicates the maximum of ni. All categories must balance the data based on nmax. In Figure 3, for example, n1 represents the amount of data in Category 1 and is equal to 60. nmax is equal to 100. Category 1 must balance data based on nmax. The difference between the original n1 (60) and nmax (100) values is 40. If we increase the amount of data in categories 1 to 120, the difference between 2×n1 (120) and nmax (100) decreases to 20. Therefore, in category 1, the best multiple was 2. In another example, n2 indicates the amount of data in category 2 and is equal to 30. If we increase the amount of data in categories 2 to 90, the difference between 3×n2 (90) and nmax (100) is 10. However, if the amount of data in categories 2 to 120 is increased, the difference between 4×n2 (120) and nmax (100) increases to 20. Therefore, in category 2, the best multiple is 3. Based on the above concept, the rules of multiplication for data balancing are listed in Table 3. In Table 3, if 2/k−2nmax≥ni>2/knmax, the multiple of the data balance is k−1/2. The main process of the intelligent data preprocessing algorithm is illustrated in Figure 4. This algorithm requires only the normalized data, multiple to be used for enhancement, and the partition ratio of the dataset as input. Finally, we obtained the balanced, enhanced, and partitioned dataset. We generated new samples and expanded the database size by adding slight noise to the input data while maintaining the same output category. The value of the noise was between −0.03 and +0.03.Figure 3
Two examples of data balancing.Table 3
Rules of multiplication on data balancing.
The amount of the data of the categoryi (ni)The multiple of the data balancenmax≥ni>2nmax/33−1/2=12nmax/3≥ni>2nmax/55−1/2=22nmax/5≥ni>2nmax/77−1/2=3⋮⋮2nmax/k−2≥ni>2nmax/kk−1/2Figure 4
Intelligent data preprocessing algorithm flow chart.After data balancing, the data were increased by three times in the initial experiments and ten times in the final experiment. In addition, data representation was an essential part of a successful ANN [37]. In this study, the output variable was categorized according to four binary numbers, namely, 1000, 0100, 0010, and 0001, where the position of 1 indicates the category.


### 3.2. Computing Environment Settings

We used Python 3.7 (64 bit) as the compiler to write the program. The hardware included an Intel Core (TM) i7-10510U (2.3 GHz) CPU, 8 GB of memory, and Windows 10 Home Edition (64 bit) operating system.


### 3.3. Experimental Structure

The experiment was conducted in two parts. In the first part, we used MLP to construct the surgery duration prediction system and the anesthesia emergence duration prediction system. To determine the optimal architecture of both models, we conducted two sets of experiments with the same data partitioning and parameter settings. The total dataset was divided into three datasets, namely training, testing, and validation, in the respective proportions of 60, 20, and 20% [39, 40].In the MLP, the Adam optimizer was used to adjust the weights and the cross-entropy loss function to calculate the loss of the prediction system. The batch size was set to 100, and the number of training cycles was set to 200 and 1,000 in the final experiment of the optimal architecture. The number of hidden layers and hidden nodes in each layer are critical determiners of the results [35, 39, 41]. We used a trial-and-error method to identify an optimal number of hidden layers and hidden nodes. The number of hidden layers was set to three, four, five, and six, and the number of hidden layer nodes of each layer was set to 64, 128, 256, and 512, respectively. Thus, the experimental results of the 16 parameter combinations were obtained for comparison and analysis. To reduce the stochastic effects of the experiments, we conducted ten experiments for each parameter combination. Finally, we obtained the two optimal architectures and weights used in the second part. Figures 5 and 6 show the MLP structure of the surgery duration prediction system and anesthesia emergence duration prediction system, respectively.Figure 5
MLP structure to predict duration of surgery.Figure 6
MLP structure to predict duration of anesthesia emergence.In the first part, we used the actual duration of surgery as the input variable of the second model. However, as mentioned in Section3.1, the output variable of the first model was the input variable of the second model. Therefore, in the second part, we merged these two prediction systems into one. In other words, we used the predicted duration of surgery as an input variable for the second model. Thus, we intersected 6,507 surgery samples with 5,790 anesthesia emergence prediction samples and obtained 4,285 samples. The predicted surgical duration was obtained by feeding the samples into the first prediction system. The predicted duration of surgery was combined with other attributes of the samples and fed into the second prediction system to determine the duration of anesthesia emergence. Figure 7 shows the final combination prediction system.Figure 7
Final combination prediction system.


## 3.1. Data Setting

Operational records collected between January 2019 and July 2020 from the Affiliated Hospital of Panzhihua University were used as samples in this study. The records were used only for academic purposes and were anonymized to protect privacy.In total, 15,754 samples were collected for this study. These samples were the data of patients without hepatic and renal diseases. To eliminate potential factors that could influence the operation time, all samples from emergency surgery patients or patients admitted to the intensive care unit after surgery were excluded. Thus, records from only patients with complete case data were included. Samples with all types of anesthesia were considered to predict the duration of surgery, whereas only samples under general anesthesia were considered to predict the duration of anesthesia emergence.To improve the prediction accuracy of the model, we collected the data available preoperatively and identified the influencing factors of surgery and anesthesia emergence durations as the input variables of the model through literature survey and physician interviews. The input and output variables of the surgery and anesthesia emergence duration prediction systems are presented in Tables1 and 2, respectively. In Table 1, the input variables are composed of three parts: basic patient information and preoperative physiological data (A1–A18), surgeon information (A20–A23), and operation information (A19 and A24). In Table 2, the input variables are composed of three parts: basic patient information and preoperative physiological data (A1–A18), anesthesiologist information (A20–A23), and operation information (A19 and A24). By comparing these tables, we observed that the 20th and 24th input variables of the two systems were different. Firstly, as mentioned in the data setting criteria, samples with both local and general anesthesia were used in the first system, whereas only samples with general anesthesia were used in the second system. Hence, they were subdivided into four types of general anesthesia. Furthermore, the duration of surgery was dependent on the surgeon, whereas the duration of anesthesia emergence was dependent on the anesthesiologist. Moreover, the surgical grade had a profound impact on the duration of surgery but a negligible effect on the duration of anesthesia emergence. Hence, it was ignored in the latter case. In summary, the duration of surgery may affect the duration of anesthesia emergence. Therefore, the output variable of the first system was used as the 24th input variable of the second system. Given that the duration of surgery was less than 4 h, all samples with a duration of less than 4 h were used to predict the duration of surgery. Given that most durations of anesthesia emergence are less than 1 h, all samples with a duration of less than 1 h were used to predict the duration of anesthesia emergence. Therefore, the last row of Table 1 shows that the surgery duration was divided into four scales: no more than one hour, 1 h to 2 h, 2 h to 3 h, and 3 h to 4 h. Similarly, the duration of anesthesia emergence was divided into four scales: no more than 15, 15 to 40, 40 to 50, and 50 to 60 min, as shown in the last row of Table 2.Table 1
Input and output variables of the surgery duration prediction system.
VariablesNameDescriptionInput1. GenderA1(1) Male(2) Female2. BMIA2Body mass index3. SBPA3Systolic blood pressure4. DBPA4Diastolic blood pressure5. PRA5Pulse rate6. RRA6Respiration rate7. TemperatureA7Body temperature8. Heart function classificationA8(1) I level(2) II level(3) III level9. RBCA9Red blood cell10. HBA10Hemoglobin11. HCTA11Hematocrit12. PLTA12Platelet13. KA13Potassium14. NAA14Sodium15. CLA15Chlorine16. APTTA16Activated partial thromboplastic time17. PTA17Prothrombin time18. TTA18Thrombin time19. American society of anesthesiologists (ASA) classificationA19(1) I level(2) II level(3) III level20. Anesthesia typeA20(1) Local anesthesia(2) General anesthesia21. Surgeon titleA21(1) Physician(2) Attending physician(3) Deputy chief physician(4) Chief physician22. Seniority of surgeonA22The working years of surgeon23. Age of surgeonA23—24. Surgical gradeA24(1) Small(2) Medium(3) Large(4) SuperOutput (original)Duration of surgeryT(1)≤1 hour(2) 1-2 hours(3) 2-3 hours(4) 3-4 hoursOutput (statistical)Duration of surgeryT(1) 1000(2) 0100(3) 0010(4) 0001Table 2
Input and output variables of the anesthesia emergence duration prediction system.
VariablesNameDescriptionInput1. GenderA1(1) Male(2) Female2. BMIA2Body mass index3. SBPA3Systolic blood pressure4. DBPA4Diastolic blood pressure5. PRA5Pulse rate6. RRA6Respiration rate7. TemperatureA7Body temperature8. Heart function classificationA8(1) I level(2) II level(3) III level9. RBCA9Red blood cell10. HBA10Hemoglobin11. HCTA11Hematocrit12. PLTA12Platelet13. KA13Potassium14. NAA14Sodium15. CLA15Chlorine16. APTTA16Activated partial thromboplastic time17. PTA17Prothrombin time18. TTA18Thrombin time19. American society of anesthesiologists (ASA) classificationA19(1) I level(2) II level(3) III level20. Anesthesia typeA20(1) Intravenous general anesthesia(2) Intravenous-inhalational balanced anesthesia(3) General anesthesia with block anesthesia(4) General anesthesia with intraspinal anesthesia21. Title of anesthesiologistA21(1) Physician(2) Attending physician(3) Deputy chief physician(4) Chief physician22. Seniority of anesthesiologistA22The working years of anesthesiologist23. Age of anesthesiologistA23—24. Duration of surgeryA24(1)≤1 hour(2) 1-2 hours(3) 2-3 hours(4) 3-4 hoursOutput (original)Duration of anesthesia emergenceT(1)≤15 minutes(2) 15–40 minutes(3) 40–50 minutes(4) 50–60 minutesOutput (statistical)Duration of anesthesia emergenceT(1) 1000(2) 0100(3) 0010(4) 0001The success of an ANN depends heavily on appropriate data preprocessing. Hence, all data in this study were preprocessed using data transformation [36], inspection [37], and exclusion of outliers. After data preprocessing, 6,507 and 5,790 surgery samples were retrospectively used to predict the durations of surgery and anesthesia emergence, respectively. In addition, normalizing the data is recommended to avoid gradient explosion and eliminate the influence of data heterogeneity, which can hinder the learning process [38]. All the data normalized ranged between 0.1 and 0.9. Moreover, balancing and enriching data are essential steps in solving classification problems [39]. We propose an intelligent data-preprocessing algorithm to balance and enhance the dataset. Thereafter, we divided the dataset into training, testing, and validation datasets. The most important process of this algorithm was data balancing. The purpose of data balancing is to reduce the differences in the amount of data in each category. Two examples of data balancing are shown in Figure 3. ni indicates the amount of data in category i, and nmax indicates the maximum of ni. All categories must balance the data based on nmax. In Figure 3, for example, n1 represents the amount of data in Category 1 and is equal to 60. nmax is equal to 100. Category 1 must balance data based on nmax. The difference between the original n1 (60) and nmax (100) values is 40. If we increase the amount of data in categories 1 to 120, the difference between 2×n1 (120) and nmax (100) decreases to 20. Therefore, in category 1, the best multiple was 2. In another example, n2 indicates the amount of data in category 2 and is equal to 30. If we increase the amount of data in categories 2 to 90, the difference between 3×n2 (90) and nmax (100) is 10. However, if the amount of data in categories 2 to 120 is increased, the difference between 4×n2 (120) and nmax (100) increases to 20. Therefore, in category 2, the best multiple is 3. Based on the above concept, the rules of multiplication for data balancing are listed in Table 3. In Table 3, if 2/k−2nmax≥ni>2/knmax, the multiple of the data balance is k−1/2. The main process of the intelligent data preprocessing algorithm is illustrated in Figure 4. This algorithm requires only the normalized data, multiple to be used for enhancement, and the partition ratio of the dataset as input. Finally, we obtained the balanced, enhanced, and partitioned dataset. We generated new samples and expanded the database size by adding slight noise to the input data while maintaining the same output category. The value of the noise was between −0.03 and +0.03.Figure 3
Two examples of data balancing.Table 3
Rules of multiplication on data balancing.
The amount of the data of the categoryi (ni)The multiple of the data balancenmax≥ni>2nmax/33−1/2=12nmax/3≥ni>2nmax/55−1/2=22nmax/5≥ni>2nmax/77−1/2=3⋮⋮2nmax/k−2≥ni>2nmax/kk−1/2Figure 4
Intelligent data preprocessing algorithm flow chart.After data balancing, the data were increased by three times in the initial experiments and ten times in the final experiment. In addition, data representation was an essential part of a successful ANN [37]. In this study, the output variable was categorized according to four binary numbers, namely, 1000, 0100, 0010, and 0001, where the position of 1 indicates the category.


## 3.2. Computing Environment Settings

We used Python 3.7 (64 bit) as the compiler to write the program. The hardware included an Intel Core (TM) i7-10510U (2.3 GHz) CPU, 8 GB of memory, and Windows 10 Home Edition (64 bit) operating system.


## 3.3. Experimental Structure

The experiment was conducted in two parts. In the first part, we used MLP to construct the surgery duration prediction system and the anesthesia emergence duration prediction system. To determine the optimal architecture of both models, we conducted two sets of experiments with the same data partitioning and parameter settings. The total dataset was divided into three datasets, namely training, testing, and validation, in the respective proportions of 60, 20, and 20% [39, 40].In the MLP, the Adam optimizer was used to adjust the weights and the cross-entropy loss function to calculate the loss of the prediction system. The batch size was set to 100, and the number of training cycles was set to 200 and 1,000 in the final experiment of the optimal architecture. The number of hidden layers and hidden nodes in each layer are critical determiners of the results [35, 39, 41]. We used a trial-and-error method to identify an optimal number of hidden layers and hidden nodes. The number of hidden layers was set to three, four, five, and six, and the number of hidden layer nodes of each layer was set to 64, 128, 256, and 512, respectively. Thus, the experimental results of the 16 parameter combinations were obtained for comparison and analysis. To reduce the stochastic effects of the experiments, we conducted ten experiments for each parameter combination. Finally, we obtained the two optimal architectures and weights used in the second part. Figures 5 and 6 show the MLP structure of the surgery duration prediction system and anesthesia emergence duration prediction system, respectively.Figure 5
MLP structure to predict duration of surgery.Figure 6
MLP structure to predict duration of anesthesia emergence.In the first part, we used the actual duration of surgery as the input variable of the second model. However, as mentioned in Section3.1, the output variable of the first model was the input variable of the second model. Therefore, in the second part, we merged these two prediction systems into one. In other words, we used the predicted duration of surgery as an input variable for the second model. Thus, we intersected 6,507 surgery samples with 5,790 anesthesia emergence prediction samples and obtained 4,285 samples. The predicted surgical duration was obtained by feeding the samples into the first prediction system. The predicted duration of surgery was combined with other attributes of the samples and fed into the second prediction system to determine the duration of anesthesia emergence. Figure 7 shows the final combination prediction system.Figure 7
Final combination prediction system.


## 4. Experimental Results and Analysis

### 4.1. Experimental Results of the Surgery Duration Prediction System

We used a trial-and-error method to identify the final architecture of the surgery duration prediction system. The experimental results are listed in Tables4–11. Tables 4 and 5 present the prediction accuracy and loss value, respectively, of the surgery duration prediction system. In addition, to further explore the performance of several different MLP architectures, the experimental results were analyzed using the t-test, as shown in Tables 6–10. Table 11 lists the running time costs for each architecture. We determined the final architecture of the MLP based on the maximum prediction accuracy and a reasonable running time cost.Table 4
Prediction accuracy of the surgery duration prediction system.
Layers-neuronsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin3-640.60130.01270.61730.57370.66140.01400.67580.63080.60330.01050.61710.57893-1280.68300.01740.69910.63740.75070.01600.76560.71170.68630.01220.70100.65673-2560.72520.01310.74180.70560.79960.01350.82330.77970.72660.01600.75560.70983-5120.72540.01310.74910.71080.79960.01170.81790.78360.72610.01170.74010.70934-640.65060.01240.66550.62600.71800.00900.73050.70530.65360.01150.67290.63234-1280.73400.01180.74980.70780.80840.00870.82690.79550.73490.00870.75640.72544-2560.77110.01150.79190.75600.84680.01180.86750.83030.77140.01240.79180.75644-5120.76390.01560.78780.73120.84020.01860.86810.80490.76560.01610.78770.73525-640.66140.01110.67900.64210.73350.01080.74810.71390.66240.01000.67710.64685-1280.73590.01380.75820.71820.81160.01290.83310.79500.73290.01230.74710.71655-2560.76010.01950.78540.72720.83860.01890.86080.80590.76360.01820.78850.73475-5120.75840.01680.78170.73660.83650.01540.85690.81400.75590.01490.78480.73766-640.67010.01260.69160.64640.74240.01580.76560.71100.66800.01440.68630.63686-1280.72010.01680.74910.69480.79600.01730.82690.77170.72010.01580.75330.70336-2560.74930.01610.77490.72000.82970.01610.86050.79940.74990.01650.77400.71636-5120.72810.02330.75480.67920.80460.02340.83450.75880.72710.02040.75740.6858Table 5
Loss value of the surgery duration prediction system.
Layers-neuronsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin3-640.69740.00300.70410.69360.68280.00340.69030.67950.69690.00260.70290.69353-1280.67710.00420.68820.67350.66040.00400.67010.65670.67630.00310.68390.67313-2560.66650.00320.67120.66260.64810.00330.65290.64230.66620.00390.67050.65903-5120.66640.00320.67000.66050.64810.00300.65210.64350.66640.00300.67080.66274-640.68500.00280.69070.68180.66860.00220.67170.66560.68430.00280.68910.67974-1280.66430.00280.67030.66040.64590.00220.64920.64120.66410.00220.66650.65874-2560.65510.00280.65880.65010.63640.00290.64040.63120.65500.00300.65860.65014-5120.65690.00380.66490.65110.63800.00460.64670.63110.65650.00390.66390.65135-640.68240.00290.68760.67790.66460.00270.66930.66100.68210.00250.68600.67855-1280.66390.00340.66820.65830.64510.00320.64920.63980.66450.00310.66880.66115-2560.65790.00480.66610.65170.63830.00470.64640.63270.65700.00450.66400.65065-5120.65830.00420.66390.65270.63890.00380.64460.63390.65890.00360.66320.65196-640.68020.00320.68630.67480.66230.00390.67020.65650.68070.00360.68830.67636-1280.66790.00430.67420.66050.64890.00430.65490.64130.66770.00390.67190.65966-2560.66060.00400.66800.65420.64050.00400.64800.63290.66040.00410.66900.65446-5120.66590.00580.67820.65950.64680.00580.65810.63940.66610.00500.67610.6585Table 6
Thet-test in 3 hidden layer architecture.
Architecture3-1283-2563-5123-640.0000∗0.0000∗0.0000∗3-128—0.0000∗0.0000∗3-256——0.4854Table 7
Thet-test in 4 hidden layer architecture.
Architecture4-1284-2564-5124-640.0000∗0.0000∗0.0000∗4-128—0.0000∗0.0001∗4-256——0.1291Table 8
Thet-test in 5 hidden layer architecture.
Architecture5-1285-2565-5125-640.0000∗0.0000∗0.0000∗5-128—0.0025∗0.0021∗5-256——0.4207Table 9
Thet-test in 6 hidden layer architecture.
Architecture6-1286-2566-5126-640.0000∗0.0000∗0.0000∗6-128—0.0004∗0.19426-256——0.0145∗Table 10
Thet-test in 3–6 hidden layer architectures.
Architecture4-2565-2566-2563-2560.0000∗0.0001∗0.0009∗4-256—0.07100.0013∗5-256——0.0979Table 11
Running time cost of each architecture of the surgery duration prediction system.
ArchitectureTime (s)3-64339.723-128404.733-256584.243-5121806.504-64375.724-128474.834-256756.634-5122480.105-64404.155-128560.635-256923.485-5123325.306-64448.186-128622.166-2561072.776-5124155.28In Table4, Mean and Std indicate the average prediction accuracy and standard deviation, respectively, over ten experiments. Max and Min indicate the maximum and minimum prediction accuracies during 10 experiments, respectively. Here, 3-64 denotes the MLP model with 3 hidden layers and 64 hidden neurons in each hidden layer. In the three hidden layer architectures in Tables 4 and 5, the 3-512 architecture had the maximum average prediction accuracy (0.7254) and the minimum loss value (0.6664) in the testing dataset. As shown in Table 6, the 3-512 architecture is significantly better than the 3-64 and 3-128 architecture. However, the 3-512 architecture is not significantly better than the 3-256 architecture. The p value is 0.4854. In other words, the 3-512 architecture and 3-256 architecture had similar prediction accuracies. In Table 11, we notice that the 3-512 architecture had a longer running time (1806.50 s) than the 3-256 architecture (584.24 s). In other words, among the three hidden layer architectures, the 3-256 architecture reduced runtime costs by 67.66% compared with the 3-512 architecture. Therefore, in the three hidden layer architectures, we chose the 3-256 architecture prediction system.In the four, five, and six hidden layer architectures, in Tables4 and 5, we note that the 4-256, 5-256, and 6-256 architectures had the maximum average prediction accuracies (0.7711, 0.7601, and 0.7493, respectively) and the minimum loss values (0.6551, 0.6579, and 0.6606, respectively) in the testing dataset. In Tables 7 and 8, the MLP model with 256 neurons is significantly better than those with 64 and 128 neurons. However, the MLP model with 256 neurons was not significantly better than the model with 512 neurons. The p values were 0.1291 and 0.4207, respectively. In other words, in four-and five-hidden-layer architectures, the MLP models with 256 and 512 neurons had similar prediction accuracies. However, from Table 11, we note that the 4-256 and 5-256 architectures reduced runtime costs by 69.49 and 72.23% compared with the 4-512 and 5-512 architectures, respectively. Therefore, in four and five hidden layer architectures, we chose the 4-256 and 5-256 architecture prediction systems. In Table 9, among the six hidden layer architectures, the 6-256 architecture was significantly better than the other architectures.In all architectures, in Tables4 and 5, the 4-256 architecture had the maximum average (Mean) prediction accuracies (0.7711, 0.8468, and 0.7714) and the minimum loss values (0.6551, 0.6364, and 0.6550) in the testing, training, and validation datasets, respectively. In addition, the 4-256 architecture had the best maximum (Max) and minimum (Min) prediction accuracy in almost all the testing, training, and verification datasets. In Table 10, the 4-256 architecture was significantly better than the 3-256 and 6-256 architectures but not significantly better than the 5-256 architecture. However, the p value (0.0710) was close to 0.05. In other words, the 4–256 architecture was significantly better than the 5-256 architecture. In addition, in Table 11, the 4-256 architecture saved 18.07% of the runtime cost compared to the 5-256 architecture. Therefore, the final architecture of the surgery duration prediction system is a 4-256 architecture.After determining the best architecture of the surgery duration prediction system, we further improved the prediction accuracy through dropout mechanism, data enrichment, and longer training time. The experimental results are listed in Tables12–15. Tables 12 and 13 present the effect of the dropout mechanism, and Tables 14 and 15 present the impact of the data enrichment and longer training time on the 4-256 architecture, respectively. In Tables 12 and 13, we note that the 4-256 architecture without the dropout mechanism had the maximum average prediction accuracy (0.7711) and minimum loss value (0.6551) in the testing dataset. With an increase in the dropout probability, the average prediction accuracy decreases. In other words, the dropout mechanism cannot improve the prediction accuracy of the surgery duration prediction system. We enriched the data 10 times, and in Tables 14 and 15, the 4-256 architecture with 10 times the data had a better average prediction accuracy (0.8788) and loss value (0.6284) in the testing dataset. We also increased the training time to 1,000 epochs and found that the average prediction accuracy increased to 0.9485, and the average loss value decreased to 0.6110 in the testing dataset. In other words, data enrichment and increasing training time improved the prediction accuracy of surgery duration prediction system. The final architecture of the surgery duration prediction system is the 4-256 architecture without dropout mechanism, trained with 10 times the data over 1,000 epochs.Table 12
Prediction accuracy of the surgery duration prediction system with dropout mechanism.
ArchitectureDropoutTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin4-256Without0.77110.01150.79190.75600.84680.01180.86750.83030.77140.01240.79180.75640.10.72870.01150.74850.71120.81120.01200.82890.79070.72980.01220.74660.70930.20.65620.00580.66480.64740.72630.00560.73490.71780.65580.00480.66220.64670.30.59300.00850.60610.57940.64710.00960.66600.62900.59300.00870.60620.5782Table 13
Loss value of the surgery duration prediction system with dropout mechanism.
ArchitectureDropoutTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin4-256Without0.65510.00280.65880.65010.63640.00290.64040.63120.65500.00300.65860.65010.10.66550.00290.67030.66050.64520.00300.65020.64080.66530.00300.67030.66130.20.68340.00140.68520.68120.66620.00140.66820.66400.68340.00100.68540.68230.30.69890.00190.70200.69560.68580.00230.69000.68110.69880.00210.70230.6953Table 14
Prediction accuracy of the surgery duration prediction system with data enrichment and longer training time.
LayersNeuronsMultipleEpochsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin425632000.77110.01150.79190.75600.84680.01180.86750.83030.77140.01240.79180.7564102000.87880.01340.89300.84530.89200.01280.90550.86020.87380.01380.88780.83981010000.94850.00550.95500.94020.95300.00460.95990.94720.94730.00590.95700.9389Table 15
Loss value of the surgery duration prediction system with data enrichment and longer training time.
LayersNeuronsMultipleEpochsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin425632000.65510.00280.65880.65010.63640.00290.64040.63120.65500.00300.65860.6501102000.62840.00330.63680.62480.62510.00310.63290.62180.62960.00340.63800.62621010000.61100.00140.61300.60930.60980.00110.61130.60810.61120.00150.61340.6088


### 4.2. Experimental Results of the Anesthesia Emergence Duration Prediction System

We used a trial-and-error method to determine the final architecture of the anesthesia emergence duration prediction system. The experimental results are presented in Tables16–23. Tables 16 and 17 present the prediction accuracy and loss values of the model, respectively. To further explore the performance of several different MLP architectures, the experimental results were also analyzed using t-tests, as shown in Tables 18–22. Table 23 lists the running time costs for each architecture. We determined the final architecture of the MLP based on the maximum prediction accuracy and a reasonable running time cost.Table 16
Prediction accuracy of the anesthesia emergence duration prediction system.
Layers-neuronsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin3-640.61680.01370.63670.59580.66850.01560.69050.64920.62430.01330.65090.60393-1280.69100.00690.70130.68120.74190.00930.75290.72400.69530.00810.70600.68163-2560.73870.00850.75450.72820.78690.00620.79410.77430.74110.00830.75570.72663-5120.73910.01480.77050.72410.79130.01500.81830.77580.74250.01320.76740.72664-640.65780.01120.67290.63720.70930.00910.72150.69210.66210.00970.67490.64374-1280.73700.01630.76190.71800.78850.01580.81350.76520.73930.01570.75940.71244-2560.78360.01520.81310.76500.83420.01320.85810.81780.78470.01570.80910.75584-5120.77310.01810.79150.73590.83010.01670.85020.80160.78010.01770.80030.74515-640.68090.01530.70400.65700.73770.01500.75680.70950.68890.01870.71400.65585-1280.76320.02010.79650.73650.81620.02070.85240.78410.76430.02010.79930.74115-2560.79050.01580.81140.76510.84430.01510.86530.82060.79240.01670.81170.75995-5120.75310.02460.78280.69560.80960.02270.83540.75610.75690.02110.78150.70606-640.68120.01660.70530.64770.73890.01610.75610.70230.68830.01550.70940.65376-1280.74540.01430.77300.72100.80570.01390.82890.77800.74990.01410.77320.72256-2560.74200.02820.78660.70300.80140.02720.84190.76490.74290.02750.78920.70296-5120.70440.01700.73290.68120.76300.01780.79100.73510.71010.01600.74110.6905Table 17
Loss value of the anesthesia emergence duration prediction system.
Layers-neuronsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin3-640.69350.00330.69850.68870.68110.00380.68570.67580.69170.00320.69670.68523-1280.67510.00180.67770.67260.66250.00230.66690.65980.67400.00200.67750.67143-2560.66330.00210.66580.65930.65140.00160.65460.64950.66270.00210.66620.65903-5120.66320.00370.66700.65540.65020.00370.65390.64350.66230.00330.66600.65614-640.68350.00270.68870.68010.67070.00220.67490.66760.68230.00230.68680.67924-1280.66360.00410.66820.65730.65090.00390.65660.64480.66310.00380.66950.65844-2560.65200.00370.65660.64500.63950.00330.64380.63370.65180.00380.65890.64594-5120.65470.00450.66410.65010.64050.00420.64770.63550.65290.00430.66150.64815-640.67760.00370.68330.67210.66350.00370.67050.65880.67560.00450.68340.66955-1280.65710.00490.66370.64900.64400.00520.65200.63500.65690.00500.66280.64825-2560.65030.00400.65670.64500.63700.00370.64280.63190.64990.00420.65780.64495-5120.65970.00610.67400.65250.64560.00560.65890.63930.65880.00520.67130.65266-640.67750.00410.68590.67170.66330.00400.67250.65900.67580.00380.68410.67036-1280.66160.00350.66760.65500.64660.00340.65350.64090.66050.00340.66730.65486-2560.66240.00690.67200.65140.64760.00670.65660.63760.66220.00680.67210.65086-5120.67180.00430.67770.66460.65720.00440.66420.65030.67040.00400.67510.6629Table 18
Thet-test in 3 hidden layer architecture.
Architecture3-1283-2563-5123-640.0000∗0.0000∗0.0000∗3-128—0.0000∗0.0000∗3-256——0.4726Table 19
Thet-test in 4 hidden layer architecture.
Architecture4-1284-2564-5124-640.0000∗0.0000∗0.0000∗4-128—0.0000∗0.0001∗4-256——0.0892Table 20
Thet-test in 5 hidden layer architecture.
Architecture5-1285-2565-5125-640.0000∗0.0000∗0.0000∗5-128—0.0017∗0.16515-256——0.0004∗Table 21
Thet-test in 6 hidden layer architecture.
Architecture6-1286-2566-5126-640.0000∗0.0000∗0.0032∗6-128—0.36750.0000∗6-256——0.0010∗Table 22
Thet-test in 3–6 hidden layer architectures.
Architecture4-2565-2566-1283-2560.0000∗0.0000∗0.11064-256—0.16800.0000∗5-256——0.0000∗Table 23
Running time cost of each architecture of the anesthesia emergence duration prediction system.
NeuronsTime(s)3-64329.913-128426.523-256613.933-5121928.914-64380.234-128485.554-256862.834-5122709.285-64399.415-128579.375-2561180.405-5123490.636-64434.806-128988.216-2561204.036-5124245.20In the three hidden layer architectures in Tables16 and 17, the 3-512 architecture had the maximum average prediction accuracy (0.7391) and the minimum loss value (0.6632) in the testing dataset. As shown in Table 18, the 3-512 architecture was significantly better than the 3-64 and 3-128 architectures. However, the 3-512 architecture is not significantly better than the 3-256 architecture. The p value was 0.4726. In other words, the 3-512 architecture and 3-256 architecture had similar prediction accuracies. In Table 23, we note that the 3-512 architecture have a longer running time (1928.91 s) than the 3-256 architecture (613.93 s); hence, the 3-256 architecture reduced the runtime cost by 68.17%. Therefore, we determine that the 3-256 architecture was the best architecture for the prediction system.In the four and five hidden layer architectures, as listed in Tables16 and 17, the 4-256 and 5-256 architectures show the maximum average prediction accuracies (0.7836 and 0.7905, respectively) and the minimum loss values (0.6520 and 0.6503, respectively) in the testing dataset. In Table 19, the 4-256 architecture is significantly better than the 4-64 and 4-128 architectures, but not significantly better than the 4-512 architecture. However, the p value (0.0892) was close to 0.05. In other words, the 4-256 architecture was significantly better than the 4-512 architecture. In Table 23, the 4-256 architecture saved 68.15% of the runtime cost compared with the 4-512 architecture. Therefore, among the four hidden layer architectures, we determine that the best architecture of the prediction system was the 4-256 architecture. In Table 20, the 5-256 architecture is significantly better than the other five hidden-layer architectures.In the six hidden layer architectures, in Tables16 and 17, the 6-128 architecture have the maximum average prediction accuracy (0.7454) and the minimum loss value (0.6616) in the testing dataset. As shown in Table 21, the 6-128 architecture is significantly better than the 6-64 and 6-512 architectures. However, the 6-128 architecture is not significantly better than the 6-256 architecture. The p value was 0.3675. Therefore, the 6-128 and 6-256 architectures have similar prediction accuracies. However, as shown in Table 23, the 6-256 architecture have a longer running time (1204.03 s) than the 6-128 architecture (988.21 s). Therefore, the 6-128 reduced the runtime cost by 17.93% and was the best architecture for the prediction system.In all architectures, as listed in Tables16 and 17, the 5-256 architecture had the maximum average (Mean) prediction accuracies (0.7905, 0.8443, and 0.7924) and minimum loss values (0.6503, 0.6370, and 0.6499) in the testing, training, and validation datasets, respectively. In addition, the 5-256 architecture had the best maximum (Max) and minimum (Min) prediction accuracy in almost all testing, training, and verification datasets. In Table 22, the 5-256 architecture was significantly better than the 3-256 and 6-128 architectures, but not significantly better than the 4-256 architecture. The 5-256 architecture and 4-256 architecture have similar prediction accuracies. Finally, in Table 23, the 4-256 architecture reduced the runtime costs by 26.90% compared to the 5-256 architecture. Therefore, we determine that the final architecture of the anesthesia emergence duration prediction system is the 4-256 architecture.After we determined the best architecture of the anesthesia emergence duration prediction system, we further improved the prediction accuracy using the dropout mechanism, data enrichment, and longer training time. The experimental results are listed in Tables24–27. Tables 24 and 25 present the effect of the dropout mechanism, and Tables 26 and 27 present the impact of data enrichment and longer training time on the 4-256 architecture. In Tables 24 and 25, we can easily observe that the 4-256 architecture without the dropout mechanism had the maximum average prediction accuracy (0.7836) and minimum loss value (0.6520) in the testing dataset. With an increase in dropout probability, the average prediction accuracy decreases. Thus, the dropout mechanism cannot improve the prediction accuracy of the anesthesia emergence duration prediction system. We then enriched the data ten times. In Tables 26 and 27, the 4-256 architecture with 10 datasets had a better average prediction accuracy (0.8956) and loss value (0.6242) in the testing dataset. We increased the training time to 1,000 epochs, and we determined that the average prediction accuracy increased to 0.9544, and the average loss value decreased to 0.6095 in the testing dataset. Finally, the architecture of the anesthesia emergence duration prediction system is a 4-256 architecture without a dropout mechanism, trained with 10 times of data over 1,000 epochs.Table 24
Prediction accuracy of the anesthesia emergence duration prediction system with dropout mechanism.
ArchitectureDropoutTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin4-256Without0.78360.01520.81310.76500.83420.01320.85810.81780.78470.01570.80910.75580.10.74380.01140.76320.72510.80620.01350.83340.78410.74620.01440.77500.71780.20.65820.00900.67730.64690.71940.00790.73360.70880.66800.00420.67430.65970.30.60730.01050.62480.59160.65720.01170.67520.63660.61750.00870.63080.6053Table 25
Loss value of the anesthesia emergence duration prediction system with dropout mechanism.
ArchitectureDropoutTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin4-256Without0.65200.00370.65660.64500.63950.00330.64380.63370.65180.00380.65890.64590.10.66200.00280.66650.65740.64650.00330.65200.63980.66140.00360.66860.65430.20.68320.00220.68600.67850.66800.00190.67060.66450.68070.00110.68260.67880.30.69550.00260.69960.69110.68330.00280.68830.67890.69300.00210.69610.6899Table 26
Prediction accuracy of the anesthesia emergence duration prediction system with data enrichment and longer training time.
LayersNeuronsMultipleEpochsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin425632000.78360.01520.81310.76500.83420.01320.85810.81780.78470.01570.80910.7558102000.89560.01440.90770.85820.90560.01310.91570.87180.89540.01350.90610.86091010000.95440.00290.95900.95030.95770.00220.96100.95380.95510.00310.95900.9502Table 27
Loss value of the anesthesia emergence duration prediction system with data enrichment and longer training time.
LayersNeuronsMultipleEpochsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin425632000.65200.00370.65660.64500.63950.00330.64380.63370.65180.00380.65890.6459102000.62420.00360.63350.62120.62170.00330.63010.61920.62420.00340.63280.62161010000.60950.00070.61060.60840.60870.00050.60970.60790.60940.00080.61060.6084


### 4.3. Experimental Results of the Final Combination Prediction System

In this section, we discuss the results of the final system obtained by combining the surgery duration prediction system with the anesthesia emergence duration prediction system. As mentioned in Section1, we predicted the duration of anesthesia emergence using the surgery duration. However, we could not obtain the actual duration before surgery. We then used the predicted surgery duration as the input variable for the anesthesia emergence duration prediction system. As mentioned in Section 3.3, we used 4,285 samples in the final combination prediction system. To compare the prediction accuracy of the final combination prediction system, we used 4,285 samples in the surgery duration prediction system and the anesthesia emergence duration prediction system. The experimental results are listed in Table 28.Table 28
Prediction accuracy of the final combination prediction system.
Prediction systemAccuracyThe anesthesia emergence duration prediction system0.9645The surgery duration prediction system0.9671The final combination prediction system0.9552As shown in Table28, the prediction accuracy of the anesthesia emergence duration prediction system is 0.9645. It means that 96.45% of the anesthesia emergence duration prediction accuracy can be obtained by inputting the actual surgery duration. The prediction accuracy of the surgery duration prediction system is 0.9671. It indicates that in the final combination prediction system, the input variable A24 is 96.71% correct. Finally, the prediction accuracy of the final combination prediction system is 0.9645. It implies that 95.52% of the anesthesia emergence duration prediction accuracy can be obtained by inputting 96.71% of the correct prediction of surgery duration time. This value (95.52%) was close to 96.45%. The difference between these two prediction systems is only 0.93% and less than 1%. Thus, the prediction accuracy of the final combination prediction system is acceptable.


## 4.1. Experimental Results of the Surgery Duration Prediction System

We used a trial-and-error method to identify the final architecture of the surgery duration prediction system. The experimental results are listed in Tables4–11. Tables 4 and 5 present the prediction accuracy and loss value, respectively, of the surgery duration prediction system. In addition, to further explore the performance of several different MLP architectures, the experimental results were analyzed using the t-test, as shown in Tables 6–10. Table 11 lists the running time costs for each architecture. We determined the final architecture of the MLP based on the maximum prediction accuracy and a reasonable running time cost.Table 4
Prediction accuracy of the surgery duration prediction system.
Layers-neuronsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin3-640.60130.01270.61730.57370.66140.01400.67580.63080.60330.01050.61710.57893-1280.68300.01740.69910.63740.75070.01600.76560.71170.68630.01220.70100.65673-2560.72520.01310.74180.70560.79960.01350.82330.77970.72660.01600.75560.70983-5120.72540.01310.74910.71080.79960.01170.81790.78360.72610.01170.74010.70934-640.65060.01240.66550.62600.71800.00900.73050.70530.65360.01150.67290.63234-1280.73400.01180.74980.70780.80840.00870.82690.79550.73490.00870.75640.72544-2560.77110.01150.79190.75600.84680.01180.86750.83030.77140.01240.79180.75644-5120.76390.01560.78780.73120.84020.01860.86810.80490.76560.01610.78770.73525-640.66140.01110.67900.64210.73350.01080.74810.71390.66240.01000.67710.64685-1280.73590.01380.75820.71820.81160.01290.83310.79500.73290.01230.74710.71655-2560.76010.01950.78540.72720.83860.01890.86080.80590.76360.01820.78850.73475-5120.75840.01680.78170.73660.83650.01540.85690.81400.75590.01490.78480.73766-640.67010.01260.69160.64640.74240.01580.76560.71100.66800.01440.68630.63686-1280.72010.01680.74910.69480.79600.01730.82690.77170.72010.01580.75330.70336-2560.74930.01610.77490.72000.82970.01610.86050.79940.74990.01650.77400.71636-5120.72810.02330.75480.67920.80460.02340.83450.75880.72710.02040.75740.6858Table 5
Loss value of the surgery duration prediction system.
Layers-neuronsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin3-640.69740.00300.70410.69360.68280.00340.69030.67950.69690.00260.70290.69353-1280.67710.00420.68820.67350.66040.00400.67010.65670.67630.00310.68390.67313-2560.66650.00320.67120.66260.64810.00330.65290.64230.66620.00390.67050.65903-5120.66640.00320.67000.66050.64810.00300.65210.64350.66640.00300.67080.66274-640.68500.00280.69070.68180.66860.00220.67170.66560.68430.00280.68910.67974-1280.66430.00280.67030.66040.64590.00220.64920.64120.66410.00220.66650.65874-2560.65510.00280.65880.65010.63640.00290.64040.63120.65500.00300.65860.65014-5120.65690.00380.66490.65110.63800.00460.64670.63110.65650.00390.66390.65135-640.68240.00290.68760.67790.66460.00270.66930.66100.68210.00250.68600.67855-1280.66390.00340.66820.65830.64510.00320.64920.63980.66450.00310.66880.66115-2560.65790.00480.66610.65170.63830.00470.64640.63270.65700.00450.66400.65065-5120.65830.00420.66390.65270.63890.00380.64460.63390.65890.00360.66320.65196-640.68020.00320.68630.67480.66230.00390.67020.65650.68070.00360.68830.67636-1280.66790.00430.67420.66050.64890.00430.65490.64130.66770.00390.67190.65966-2560.66060.00400.66800.65420.64050.00400.64800.63290.66040.00410.66900.65446-5120.66590.00580.67820.65950.64680.00580.65810.63940.66610.00500.67610.6585Table 6
Thet-test in 3 hidden layer architecture.
Architecture3-1283-2563-5123-640.0000∗0.0000∗0.0000∗3-128—0.0000∗0.0000∗3-256——0.4854Table 7
Thet-test in 4 hidden layer architecture.
Architecture4-1284-2564-5124-640.0000∗0.0000∗0.0000∗4-128—0.0000∗0.0001∗4-256——0.1291Table 8
Thet-test in 5 hidden layer architecture.
Architecture5-1285-2565-5125-640.0000∗0.0000∗0.0000∗5-128—0.0025∗0.0021∗5-256——0.4207Table 9
Thet-test in 6 hidden layer architecture.
Architecture6-1286-2566-5126-640.0000∗0.0000∗0.0000∗6-128—0.0004∗0.19426-256——0.0145∗Table 10
Thet-test in 3–6 hidden layer architectures.
Architecture4-2565-2566-2563-2560.0000∗0.0001∗0.0009∗4-256—0.07100.0013∗5-256——0.0979Table 11
Running time cost of each architecture of the surgery duration prediction system.
ArchitectureTime (s)3-64339.723-128404.733-256584.243-5121806.504-64375.724-128474.834-256756.634-5122480.105-64404.155-128560.635-256923.485-5123325.306-64448.186-128622.166-2561072.776-5124155.28In Table4, Mean and Std indicate the average prediction accuracy and standard deviation, respectively, over ten experiments. Max and Min indicate the maximum and minimum prediction accuracies during 10 experiments, respectively. Here, 3-64 denotes the MLP model with 3 hidden layers and 64 hidden neurons in each hidden layer. In the three hidden layer architectures in Tables 4 and 5, the 3-512 architecture had the maximum average prediction accuracy (0.7254) and the minimum loss value (0.6664) in the testing dataset. As shown in Table 6, the 3-512 architecture is significantly better than the 3-64 and 3-128 architecture. However, the 3-512 architecture is not significantly better than the 3-256 architecture. The p value is 0.4854. In other words, the 3-512 architecture and 3-256 architecture had similar prediction accuracies. In Table 11, we notice that the 3-512 architecture had a longer running time (1806.50 s) than the 3-256 architecture (584.24 s). In other words, among the three hidden layer architectures, the 3-256 architecture reduced runtime costs by 67.66% compared with the 3-512 architecture. Therefore, in the three hidden layer architectures, we chose the 3-256 architecture prediction system.In the four, five, and six hidden layer architectures, in Tables4 and 5, we note that the 4-256, 5-256, and 6-256 architectures had the maximum average prediction accuracies (0.7711, 0.7601, and 0.7493, respectively) and the minimum loss values (0.6551, 0.6579, and 0.6606, respectively) in the testing dataset. In Tables 7 and 8, the MLP model with 256 neurons is significantly better than those with 64 and 128 neurons. However, the MLP model with 256 neurons was not significantly better than the model with 512 neurons. The p values were 0.1291 and 0.4207, respectively. In other words, in four-and five-hidden-layer architectures, the MLP models with 256 and 512 neurons had similar prediction accuracies. However, from Table 11, we note that the 4-256 and 5-256 architectures reduced runtime costs by 69.49 and 72.23% compared with the 4-512 and 5-512 architectures, respectively. Therefore, in four and five hidden layer architectures, we chose the 4-256 and 5-256 architecture prediction systems. In Table 9, among the six hidden layer architectures, the 6-256 architecture was significantly better than the other architectures.In all architectures, in Tables4 and 5, the 4-256 architecture had the maximum average (Mean) prediction accuracies (0.7711, 0.8468, and 0.7714) and the minimum loss values (0.6551, 0.6364, and 0.6550) in the testing, training, and validation datasets, respectively. In addition, the 4-256 architecture had the best maximum (Max) and minimum (Min) prediction accuracy in almost all the testing, training, and verification datasets. In Table 10, the 4-256 architecture was significantly better than the 3-256 and 6-256 architectures but not significantly better than the 5-256 architecture. However, the p value (0.0710) was close to 0.05. In other words, the 4–256 architecture was significantly better than the 5-256 architecture. In addition, in Table 11, the 4-256 architecture saved 18.07% of the runtime cost compared to the 5-256 architecture. Therefore, the final architecture of the surgery duration prediction system is a 4-256 architecture.After determining the best architecture of the surgery duration prediction system, we further improved the prediction accuracy through dropout mechanism, data enrichment, and longer training time. The experimental results are listed in Tables12–15. Tables 12 and 13 present the effect of the dropout mechanism, and Tables 14 and 15 present the impact of the data enrichment and longer training time on the 4-256 architecture, respectively. In Tables 12 and 13, we note that the 4-256 architecture without the dropout mechanism had the maximum average prediction accuracy (0.7711) and minimum loss value (0.6551) in the testing dataset. With an increase in the dropout probability, the average prediction accuracy decreases. In other words, the dropout mechanism cannot improve the prediction accuracy of the surgery duration prediction system. We enriched the data 10 times, and in Tables 14 and 15, the 4-256 architecture with 10 times the data had a better average prediction accuracy (0.8788) and loss value (0.6284) in the testing dataset. We also increased the training time to 1,000 epochs and found that the average prediction accuracy increased to 0.9485, and the average loss value decreased to 0.6110 in the testing dataset. In other words, data enrichment and increasing training time improved the prediction accuracy of surgery duration prediction system. The final architecture of the surgery duration prediction system is the 4-256 architecture without dropout mechanism, trained with 10 times the data over 1,000 epochs.Table 12
Prediction accuracy of the surgery duration prediction system with dropout mechanism.
ArchitectureDropoutTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin4-256Without0.77110.01150.79190.75600.84680.01180.86750.83030.77140.01240.79180.75640.10.72870.01150.74850.71120.81120.01200.82890.79070.72980.01220.74660.70930.20.65620.00580.66480.64740.72630.00560.73490.71780.65580.00480.66220.64670.30.59300.00850.60610.57940.64710.00960.66600.62900.59300.00870.60620.5782Table 13
Loss value of the surgery duration prediction system with dropout mechanism.
ArchitectureDropoutTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin4-256Without0.65510.00280.65880.65010.63640.00290.64040.63120.65500.00300.65860.65010.10.66550.00290.67030.66050.64520.00300.65020.64080.66530.00300.67030.66130.20.68340.00140.68520.68120.66620.00140.66820.66400.68340.00100.68540.68230.30.69890.00190.70200.69560.68580.00230.69000.68110.69880.00210.70230.6953Table 14
Prediction accuracy of the surgery duration prediction system with data enrichment and longer training time.
LayersNeuronsMultipleEpochsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin425632000.77110.01150.79190.75600.84680.01180.86750.83030.77140.01240.79180.7564102000.87880.01340.89300.84530.89200.01280.90550.86020.87380.01380.88780.83981010000.94850.00550.95500.94020.95300.00460.95990.94720.94730.00590.95700.9389Table 15
Loss value of the surgery duration prediction system with data enrichment and longer training time.
LayersNeuronsMultipleEpochsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin425632000.65510.00280.65880.65010.63640.00290.64040.63120.65500.00300.65860.6501102000.62840.00330.63680.62480.62510.00310.63290.62180.62960.00340.63800.62621010000.61100.00140.61300.60930.60980.00110.61130.60810.61120.00150.61340.6088


## 4.2. Experimental Results of the Anesthesia Emergence Duration Prediction System

We used a trial-and-error method to determine the final architecture of the anesthesia emergence duration prediction system. The experimental results are presented in Tables16–23. Tables 16 and 17 present the prediction accuracy and loss values of the model, respectively. To further explore the performance of several different MLP architectures, the experimental results were also analyzed using t-tests, as shown in Tables 18–22. Table 23 lists the running time costs for each architecture. We determined the final architecture of the MLP based on the maximum prediction accuracy and a reasonable running time cost.Table 16
Prediction accuracy of the anesthesia emergence duration prediction system.
Layers-neuronsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin3-640.61680.01370.63670.59580.66850.01560.69050.64920.62430.01330.65090.60393-1280.69100.00690.70130.68120.74190.00930.75290.72400.69530.00810.70600.68163-2560.73870.00850.75450.72820.78690.00620.79410.77430.74110.00830.75570.72663-5120.73910.01480.77050.72410.79130.01500.81830.77580.74250.01320.76740.72664-640.65780.01120.67290.63720.70930.00910.72150.69210.66210.00970.67490.64374-1280.73700.01630.76190.71800.78850.01580.81350.76520.73930.01570.75940.71244-2560.78360.01520.81310.76500.83420.01320.85810.81780.78470.01570.80910.75584-5120.77310.01810.79150.73590.83010.01670.85020.80160.78010.01770.80030.74515-640.68090.01530.70400.65700.73770.01500.75680.70950.68890.01870.71400.65585-1280.76320.02010.79650.73650.81620.02070.85240.78410.76430.02010.79930.74115-2560.79050.01580.81140.76510.84430.01510.86530.82060.79240.01670.81170.75995-5120.75310.02460.78280.69560.80960.02270.83540.75610.75690.02110.78150.70606-640.68120.01660.70530.64770.73890.01610.75610.70230.68830.01550.70940.65376-1280.74540.01430.77300.72100.80570.01390.82890.77800.74990.01410.77320.72256-2560.74200.02820.78660.70300.80140.02720.84190.76490.74290.02750.78920.70296-5120.70440.01700.73290.68120.76300.01780.79100.73510.71010.01600.74110.6905Table 17
Loss value of the anesthesia emergence duration prediction system.
Layers-neuronsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin3-640.69350.00330.69850.68870.68110.00380.68570.67580.69170.00320.69670.68523-1280.67510.00180.67770.67260.66250.00230.66690.65980.67400.00200.67750.67143-2560.66330.00210.66580.65930.65140.00160.65460.64950.66270.00210.66620.65903-5120.66320.00370.66700.65540.65020.00370.65390.64350.66230.00330.66600.65614-640.68350.00270.68870.68010.67070.00220.67490.66760.68230.00230.68680.67924-1280.66360.00410.66820.65730.65090.00390.65660.64480.66310.00380.66950.65844-2560.65200.00370.65660.64500.63950.00330.64380.63370.65180.00380.65890.64594-5120.65470.00450.66410.65010.64050.00420.64770.63550.65290.00430.66150.64815-640.67760.00370.68330.67210.66350.00370.67050.65880.67560.00450.68340.66955-1280.65710.00490.66370.64900.64400.00520.65200.63500.65690.00500.66280.64825-2560.65030.00400.65670.64500.63700.00370.64280.63190.64990.00420.65780.64495-5120.65970.00610.67400.65250.64560.00560.65890.63930.65880.00520.67130.65266-640.67750.00410.68590.67170.66330.00400.67250.65900.67580.00380.68410.67036-1280.66160.00350.66760.65500.64660.00340.65350.64090.66050.00340.66730.65486-2560.66240.00690.67200.65140.64760.00670.65660.63760.66220.00680.67210.65086-5120.67180.00430.67770.66460.65720.00440.66420.65030.67040.00400.67510.6629Table 18
Thet-test in 3 hidden layer architecture.
Architecture3-1283-2563-5123-640.0000∗0.0000∗0.0000∗3-128—0.0000∗0.0000∗3-256——0.4726Table 19
Thet-test in 4 hidden layer architecture.
Architecture4-1284-2564-5124-640.0000∗0.0000∗0.0000∗4-128—0.0000∗0.0001∗4-256——0.0892Table 20
Thet-test in 5 hidden layer architecture.
Architecture5-1285-2565-5125-640.0000∗0.0000∗0.0000∗5-128—0.0017∗0.16515-256——0.0004∗Table 21
Thet-test in 6 hidden layer architecture.
Architecture6-1286-2566-5126-640.0000∗0.0000∗0.0032∗6-128—0.36750.0000∗6-256——0.0010∗Table 22
Thet-test in 3–6 hidden layer architectures.
Architecture4-2565-2566-1283-2560.0000∗0.0000∗0.11064-256—0.16800.0000∗5-256——0.0000∗Table 23
Running time cost of each architecture of the anesthesia emergence duration prediction system.
NeuronsTime(s)3-64329.913-128426.523-256613.933-5121928.914-64380.234-128485.554-256862.834-5122709.285-64399.415-128579.375-2561180.405-5123490.636-64434.806-128988.216-2561204.036-5124245.20In the three hidden layer architectures in Tables16 and 17, the 3-512 architecture had the maximum average prediction accuracy (0.7391) and the minimum loss value (0.6632) in the testing dataset. As shown in Table 18, the 3-512 architecture was significantly better than the 3-64 and 3-128 architectures. However, the 3-512 architecture is not significantly better than the 3-256 architecture. The p value was 0.4726. In other words, the 3-512 architecture and 3-256 architecture had similar prediction accuracies. In Table 23, we note that the 3-512 architecture have a longer running time (1928.91 s) than the 3-256 architecture (613.93 s); hence, the 3-256 architecture reduced the runtime cost by 68.17%. Therefore, we determine that the 3-256 architecture was the best architecture for the prediction system.In the four and five hidden layer architectures, as listed in Tables16 and 17, the 4-256 and 5-256 architectures show the maximum average prediction accuracies (0.7836 and 0.7905, respectively) and the minimum loss values (0.6520 and 0.6503, respectively) in the testing dataset. In Table 19, the 4-256 architecture is significantly better than the 4-64 and 4-128 architectures, but not significantly better than the 4-512 architecture. However, the p value (0.0892) was close to 0.05. In other words, the 4-256 architecture was significantly better than the 4-512 architecture. In Table 23, the 4-256 architecture saved 68.15% of the runtime cost compared with the 4-512 architecture. Therefore, among the four hidden layer architectures, we determine that the best architecture of the prediction system was the 4-256 architecture. In Table 20, the 5-256 architecture is significantly better than the other five hidden-layer architectures.In the six hidden layer architectures, in Tables16 and 17, the 6-128 architecture have the maximum average prediction accuracy (0.7454) and the minimum loss value (0.6616) in the testing dataset. As shown in Table 21, the 6-128 architecture is significantly better than the 6-64 and 6-512 architectures. However, the 6-128 architecture is not significantly better than the 6-256 architecture. The p value was 0.3675. Therefore, the 6-128 and 6-256 architectures have similar prediction accuracies. However, as shown in Table 23, the 6-256 architecture have a longer running time (1204.03 s) than the 6-128 architecture (988.21 s). Therefore, the 6-128 reduced the runtime cost by 17.93% and was the best architecture for the prediction system.In all architectures, as listed in Tables16 and 17, the 5-256 architecture had the maximum average (Mean) prediction accuracies (0.7905, 0.8443, and 0.7924) and minimum loss values (0.6503, 0.6370, and 0.6499) in the testing, training, and validation datasets, respectively. In addition, the 5-256 architecture had the best maximum (Max) and minimum (Min) prediction accuracy in almost all testing, training, and verification datasets. In Table 22, the 5-256 architecture was significantly better than the 3-256 and 6-128 architectures, but not significantly better than the 4-256 architecture. The 5-256 architecture and 4-256 architecture have similar prediction accuracies. Finally, in Table 23, the 4-256 architecture reduced the runtime costs by 26.90% compared to the 5-256 architecture. Therefore, we determine that the final architecture of the anesthesia emergence duration prediction system is the 4-256 architecture.After we determined the best architecture of the anesthesia emergence duration prediction system, we further improved the prediction accuracy using the dropout mechanism, data enrichment, and longer training time. The experimental results are listed in Tables24–27. Tables 24 and 25 present the effect of the dropout mechanism, and Tables 26 and 27 present the impact of data enrichment and longer training time on the 4-256 architecture. In Tables 24 and 25, we can easily observe that the 4-256 architecture without the dropout mechanism had the maximum average prediction accuracy (0.7836) and minimum loss value (0.6520) in the testing dataset. With an increase in dropout probability, the average prediction accuracy decreases. Thus, the dropout mechanism cannot improve the prediction accuracy of the anesthesia emergence duration prediction system. We then enriched the data ten times. In Tables 26 and 27, the 4-256 architecture with 10 datasets had a better average prediction accuracy (0.8956) and loss value (0.6242) in the testing dataset. We increased the training time to 1,000 epochs, and we determined that the average prediction accuracy increased to 0.9544, and the average loss value decreased to 0.6095 in the testing dataset. Finally, the architecture of the anesthesia emergence duration prediction system is a 4-256 architecture without a dropout mechanism, trained with 10 times of data over 1,000 epochs.Table 24
Prediction accuracy of the anesthesia emergence duration prediction system with dropout mechanism.
ArchitectureDropoutTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin4-256Without0.78360.01520.81310.76500.83420.01320.85810.81780.78470.01570.80910.75580.10.74380.01140.76320.72510.80620.01350.83340.78410.74620.01440.77500.71780.20.65820.00900.67730.64690.71940.00790.73360.70880.66800.00420.67430.65970.30.60730.01050.62480.59160.65720.01170.67520.63660.61750.00870.63080.6053Table 25
Loss value of the anesthesia emergence duration prediction system with dropout mechanism.
ArchitectureDropoutTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin4-256Without0.65200.00370.65660.64500.63950.00330.64380.63370.65180.00380.65890.64590.10.66200.00280.66650.65740.64650.00330.65200.63980.66140.00360.66860.65430.20.68320.00220.68600.67850.66800.00190.67060.66450.68070.00110.68260.67880.30.69550.00260.69960.69110.68330.00280.68830.67890.69300.00210.69610.6899Table 26
Prediction accuracy of the anesthesia emergence duration prediction system with data enrichment and longer training time.
LayersNeuronsMultipleEpochsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin425632000.78360.01520.81310.76500.83420.01320.85810.81780.78470.01570.80910.7558102000.89560.01440.90770.85820.90560.01310.91570.87180.89540.01350.90610.86091010000.95440.00290.95900.95030.95770.00220.96100.95380.95510.00310.95900.9502Table 27
Loss value of the anesthesia emergence duration prediction system with data enrichment and longer training time.
LayersNeuronsMultipleEpochsTesting datasetTraining datasetValidation datasetMeanStdMaxMinMeanStdMaxMinMeanStdMaxMin425632000.65200.00370.65660.64500.63950.00330.64380.63370.65180.00380.65890.6459102000.62420.00360.63350.62120.62170.00330.63010.61920.62420.00340.63280.62161010000.60950.00070.61060.60840.60870.00050.60970.60790.60940.00080.61060.6084


## 4.3. Experimental Results of the Final Combination Prediction System

In this section, we discuss the results of the final system obtained by combining the surgery duration prediction system with the anesthesia emergence duration prediction system. As mentioned in Section1, we predicted the duration of anesthesia emergence using the surgery duration. However, we could not obtain the actual duration before surgery. We then used the predicted surgery duration as the input variable for the anesthesia emergence duration prediction system. As mentioned in Section 3.3, we used 4,285 samples in the final combination prediction system. To compare the prediction accuracy of the final combination prediction system, we used 4,285 samples in the surgery duration prediction system and the anesthesia emergence duration prediction system. The experimental results are listed in Table 28.Table 28
Prediction accuracy of the final combination prediction system.
Prediction systemAccuracyThe anesthesia emergence duration prediction system0.9645The surgery duration prediction system0.9671The final combination prediction system0.9552As shown in Table28, the prediction accuracy of the anesthesia emergence duration prediction system is 0.9645. It means that 96.45% of the anesthesia emergence duration prediction accuracy can be obtained by inputting the actual surgery duration. The prediction accuracy of the surgery duration prediction system is 0.9671. It indicates that in the final combination prediction system, the input variable A24 is 96.71% correct. Finally, the prediction accuracy of the final combination prediction system is 0.9645. It implies that 95.52% of the anesthesia emergence duration prediction accuracy can be obtained by inputting 96.71% of the correct prediction of surgery duration time. This value (95.52%) was close to 96.45%. The difference between these two prediction systems is only 0.93% and less than 1%. Thus, the prediction accuracy of the final combination prediction system is acceptable.


## 5. Conclusion and Future Research

In this study, we proposed an intelligent data preprocessing algorithm that balances data automatically and used the MLP model to construct the surgery and anesthesia emergence duration prediction systems. Based on existing patient data, we identified the main attributes that affected the prediction of surgery duration and anesthesia emergence duration and then preprocessed the data accordingly. These two systems were extensively tested, compared, and analyzed to determine their implementation. By combining these two prediction systems, we were able to predict the duration of anesthesia emergence from the predicted duration of surgery. There are several interesting findings from the experimental results.Firstly, the proposed intelligent data preprocessing algorithm has three functions: data balance, data enhancement, and dataset partitioning. In particular, it can calculate the proper multiples of each category to balance the data automatically, depending on the amount of data in each category. Using this algorithm, we did not need to calculate the multiples for each category. Therefore, our workload on data balancing was reduced, especially for a large number of categories. No similar automatic processing algorithm has been found in the limited literature research. Therefore, we thought that the proposed algorithm could be extended to the data balance of data preprocessing. Secondly, the model architecture parameters have an important impact on the prediction accuracy of the model, which is consistent with the research findings of literature [14]. In their study, they took ophthalmic surgery as the research object and found that the prediction error of the model was affected by the number of hidden layer neurons. In our research, we further expanded the exploration of the model architecture and found that 4–256 architecture is the most suitable for both prediction systems. Besides, we found that the smaller the architecture, the lower the accuracy. Conversely, the larger the architecture, the longer the running time. It also shows the importance and necessity of exploring model architecture parameters. Thirdly, overtraining did not occur. Therefore, the dropout mechanism could not improve the prediction accuracy of the two prediction systems. However, data augmentation and longer learning period improved the prediction system. These results are consistent with the theory of artificial neural network. In addition, in literature [16, 17], the influence of data quality on the prediction accuracy of the model was studied, and it was found that data quality affects the prediction accuracy of the model. In this study, we found that the quantity and quality of data are very important to the prediction accuracy of the model. Finally, before the operation is performed, it is very important to predict the surgery and anesthesia emergence duration in advance for the effective scheduling of the operation. Therefore, after combining these two prediction systems, we used the predicted surgery duration to accurately predict the anesthesia emergence duration. Based on the prediction accuracy, the combination of these two prediction systems is acceptable.It is worth noting that the data used in this study were collected from the Affiliated Hospital of Panzhihua University in China. Therefore, one of the limitations of this study is that the experimental results of this study may only be applicable to the same type of hospitals in China. Besides, we still have many variables that were not considered in this study, such as the data for physical examination before surgery. In fact, we attempted to collect preoperative physical examination data and integrate them with the data used in this study. However, we found too many missing values in the physical examination data. We hypothesize that the main reason for this is that patients undergo different physical examinations. Therefore, the integrated data contained a large number of missing values. We also believe that patients undergoing the same type of surgery should undergo the same physical examination. Therefore, we suggest that in the future, depending on the organs that are subject to surgery, we could use specific physical examination items to predict the surgery duration and anesthesia emergence duration and obtain a more accurate prediction system. Finally, we aimed to predict the exact duration of surgery and anesthesia emergence duration. It can enable the scheduling of surgery to achieve resource use optimization, energy saving, carbon reduction, cost savings, and improve patient’s satisfaction. If we can accurately predict the actual surgery time, we will be able to optimize the surgery schedule. However, in practice, there are too many uncertain factors that will affect the prediction of surgery time, which makes it difficult to accurately predict the actual surgery time. Therefore, in our study, we converted the actual surgery time into a time interval (1 hour) to improve the accuracy of prediction. However, if the length of the time interval is too long, it will affect the optimization of surgical scheduling. Therefore, in the future, we suggest that the length of the time interval could be shortened, e.g., to 30 minutes, to improve the optimization of surgical scheduling. Besides, in the future, we also intend to use the predicted surgery and anesthesia emergence durations to further research operating room scheduling.



---

*Source: 2921775-2022-04-14.xml*