Method, system and equipment for predicting delirium occurrence probability based on Bayesian network
Through the Bayesian network-based prediction method, the problem of difficulty in predicting the risk of delirium after CABG in the prior art is solved, accurate prediction and early identification of the probability of delirium, and perioperative management is optimized.
Patent Information
- Application Number
- CN202411971532.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, delirium risk prediction models mainly rely on logistic regression and other linear models, and it is difficult to fully capture the complex interactions between multiple factors, resulting in the predicted results being prone to deviations and unable to effectively predict the risk of delirium after CABG surgery.
Using the Bayesian network-based delirium probability prediction method, the Bayesian network prediction model is constructed to process the complex interactions between multiple uncertain indicator terms, and model the relationship between multiple uncertain indicator terms.
Accurate prediction of the probability of delirium after coronary artery bypass grafting is achieved, providing a robust and highly adaptable framework that can identify high-risk patients early and optimize perioperative management.
Smart Images

Figure CN119889692A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biomedical technology, and in particular to a method, system and device for predicting the probability of occurrence of delirium based on a Bayesian network. Background Art
[0002] Coronary artery bypass grafting (CABG) is one of the important means of treating coronary heart disease, especially for patients with multi-vessel lesions or complex lesions. Although CABG significantly improves cardiovascular prognosis, its perioperative complications still have an important impact on the patient's recovery. Among them, postoperative delirium (POD) is one of the common complications after CABG. Reports show that the incidence of delirium after CABG is about 18%-50%. POD not only prolongs the patient's hospitalization time, but also significantly increases the patient's risk of mortality and cognitive decline after CABG, and also has a negative impact on the patient's long-term quality of life. Therefore, it is crucial to identify patients at high risk of postoperative delirium early before CABG surgery and implement effective prevention strategies for such patients.
[0003] In recent years, the application of prediction models based on big data and artificial intelligence in the medical field has become increasingly widespread, and it has also become an important tool for predicting disease risks and optimizing treatment strategies. Traditional delirium risk prediction models mainly rely on logistic regression and other linear models. However, there are many influencing variables for the probability of delirium after coronary artery bypass grafting. Traditional models are difficult to fully capture the complex interactions between multiple variables, which makes the prediction results of delirium after coronary artery bypass grafting obtained by traditional models prone to deviations, and it is impossible to effectively and comprehensively predict the risk of delirium after clinical CABG surgery. Therefore, the results predicted by the existing model cannot provide a strong evidence support for medical staff, making it impossible for medical staff to intervene in patients before, during or after surgery based on the predicted results, which will increase the probability of delirium after coronary artery bypass grafting. Summary of the invention
[0004] In order to solve the technical problem that the delirium risk prediction models in the prior art mainly rely on logistic regression and other linear models, which are difficult to fully capture the complex interactions between multiple factors, making the prediction results obtained by the above models prone to deviations and unable to effectively and comprehensively predict the risk of delirium after clinical CABG surgery, the present invention provides a method for predicting the probability of delirium based on a Bayesian network.
[0005] The present invention is implemented by the following technical solution: a method for predicting the probability of delirium based on a Bayesian network, comprising the following steps:
[0006] S1: Acquire valid case data that affect the probability of delirium after coronary artery bypass grafting, and preprocess the acquired valid case data to obtain a sample data set; use a part of the data in the sample data set as a training set, and the rest of the data as a validation set; S2: Use each indicator item in the sample data set as a node, and the influence between the various indicator items as an edge to construct an initial prediction model for the probability of delirium after coronary artery bypass grafting based on a Bayesian network;
[0007] The method for constructing the initial prediction model includes the following steps: S21: obtaining the importance ranking of each indicator item in the sample data set, and obtaining an importance ranking diagram of the indicator items that affect the probability of delirium after coronary artery bypass grafting; S22: selecting the first 6 indicator items according to the importance ranking diagram of the indicator items that affect the probability of delirium after coronary artery bypass grafting, and using the 6 indicator items as the parent nodes of the initial prediction model, and establishing a direct association between the 6 indicator items that affect the probability of delirium after coronary artery bypass grafting and delirium characteristics through a whitelist mechanism; S23: establishing an association between the 6 indicator items that affect the probability of delirium after coronary artery bypass grafting and the remaining indicator items that affect the probability of delirium after coronary artery bypass grafting, and obtaining a directed acyclic graph in the initial prediction model;
[0008] S3: using the training set and the validation set to train and validate the initial prediction model, and retaining the model parameters that meet the performance index requirements after verification, to obtain an optimized prediction model; the training process includes: S31: using the maximum likelihood estimation method and the training set to perform parameter learning on the simplified directed acyclic graph, to obtain a conditional probability table of each indicator item that affects the probability of delirium after coronary artery bypass grafting; S32: deleting redundant nodes and edges in the initial directed acyclic graph in combination with the conditional probability table, to obtain a simplified directed acyclic graph; S33: verifying the trained prediction model again with the validation set, retaining the model parameters that meet the performance index requirements after verification, to obtain an optimized prediction model;
[0009] S4: Obtain patient case data to be predicted, preprocess the patient case data to be predicted, input the preprocessed patient case data with prediction into the optimized prediction model, and output the probability of the patient to be predicted developing delirium after coronary artery bypass grafting through the optimized prediction model.
[0010] As a further improvement of the present invention, the valid case data is derived from all patients who underwent CABG surgery, and excludes data corresponding to the following situations: (1) patients under the age of 18; (2) patients who did not stay in the ICU after CABG surgery; (3) patients who were not admitted to the ICU for the first time; (4) patients without a record of postoperative delirium assessment; and (5) patients whose delirium assessment result was that they could not be assessed.
[0011] As a further improvement of the present invention, the preprocessing of the effective case data includes the following steps: S11: extracting the following data of each patient from the acquired effective case data: (1) demographic information; (2) vital signs and laboratory test results within 24 hours after admission to the ICU; (3) intervention treatment measures within 24 hours of admission to the ICU; (4) disease score within 24 hours of admission to the ICU; (5) comorbidities during the treatment of coronary heart disease; S12: excluding patient data with a missing rate exceeding 30% in the acquired patient data, and performing multiple interpolation using the MICE algorithm for the missing values in the patient data with a missing rate between 0% and 30%, to obtain interpolated patient data; S13: discretizing the indicator items in the interpolated patient data that are continuous data to obtain segmented data after discretization; S14: processing the indicator items in the patient data after difference interpolation that are categorical variables to obtain the frequency of each category in the categorical variable.
[0012] As a further improvement of the present invention, the demographic information includes age, gender, height and weight; the intervention treatment measures within 24 hours of ICU admission include whether mechanical ventilation is performed, whether continuous renal replacement therapy is performed, whether vasoactive drugs are used, whether propofol is used, whether midazolam is used, and whether dexmedetomidine is used; the disease scores for 24 hours of ICU admission include: SOFA score, GCS score, RASS score and pain score; comorbid diseases include whether the patient suffers from hypertension, whether the patient suffers from diabetes, whether congestive heart failure occurs, and whether a stroke occurs.
[0013] As a further improvement of the present invention, vital signs and BMI are classified according to clinical thresholds; laboratory test results are classified according to clinical reference ranges; age and SOFA scores are grouped according to quartiles; GCS scores, RASS scores and pain scores are discretized according to clinical experience.
[0014] As a further improvement of the present invention, the six indicator items corresponding to the six parent nodes are age, whether mechanical ventilation is performed, AG value in the patient's plasma, RASS score, GCS score and SOFA score.
[0015] As a further improvement of the present invention, a method for obtaining the importance ranking of each indicator item in the sample data set is one of the random forest algorithm, the XGBoost algorithm and the LightGBM algorithm.
[0016] As a further improvement of the present invention, in step S23, the association between the six index items that affect the probability of delirium after coronary artery bypass grafting and the remaining index items that affect the probability of delirium after coronary artery bypass grafting is established through the MMHC algorithm.
[0017] The present invention also provides a prediction system for the probability of occurrence of delirium based on a Bayesian network, comprising:
[0018] A data set construction module is used to obtain valid case data that affects the probability of delirium after coronary artery bypass grafting; a data preprocessing module preprocesses the acquired valid case data that affects the occurrence of delirium after coronary artery bypass grafting to obtain a sample data set, and uses a part of the data in the sample data set as a training set, and the rest of the data as a validation set. A model construction module is used to construct a prediction model that affects the probability of delirium after coronary artery bypass grafting; the constructed prediction model is trained by the training set, and the trained prediction model is adjusted by the validation set, and after the adjustment, an optimized prediction model for the probability of delirium after coronary artery bypass grafting based on a Bayesian network is obtained; a prediction module obtains patient case data to be predicted, and preprocesses the patient case data to be predicted, and inputs the preprocessed patient case data with prediction into the optimized prediction model, and the probability of the patient to be predicted to develop delirium after coronary artery bypass grafting is output by the optimized prediction model.
[0019] The present invention also provides a device for predicting the probability of delirium occurrence based on a Bayesian network, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for predicting the probability of delirium occurrence based on a Bayesian network.
[0020] The technical solution provided by the present invention has the following beneficial effects:
[0021] (1) The Bayesian network-based delirium probability prediction method of the present invention can effectively handle the complex interactions between multiple uncertain index items by constructing a Bayesian network prediction model, and model the relationship between multiple uncertain index items, so that the constructed Bayesian network prediction model can handle the complex clinical problem of delirium after coronary artery bypass grafting, which is driven by multiple factors. The constructed Bayesian network prediction model has a simple structure and good interpretability, thereby providing a robust and adaptable framework for risk prediction and decision-making in clinical practice, and can accurately predict the probability of delirium in patients after coronary artery bypass grafting. Medical staff can also use the prediction model to predict the probability of delirium after coronary artery bypass grafting, thereby achieving early identification of patients at high risk of delirium after coronary artery bypass grafting, so that medical staff can optimize perioperative management through prediction results.
[0022] (2) The Bayesian network-based prediction method for the probability of delirium of the present invention can combine existing evidence and data to calculate the probability of delirium under certain specific conditions. This reasoning process based on prior and posterior probabilities allows the prediction model to continuously adjust the prediction results according to the clinical scenario, helping doctors to more flexibly deal with the complex situations of different patients. In addition, the prediction model can also perform hypothesis analysis, by adjusting certain clinical variables to observe the impact of the period on the risk of delirium, providing strong evidence support for medical staff to carry out personalized intervention measures for different patients. It enables medical staff to reduce the probability of delirium in patients after coronary artery bypass grafting through personalized intervention measures. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A flow chart of a method for predicting the probability of occurrence of delirium based on a Bayesian network provided in Example 1 of the present invention.
[0024] Figure 2 This is an importance ranking diagram for ranking the importance of various indicators in a sample data set using the LightGBM algorithm in Example 1 of the present invention.
[0025] Figure 3 This is a structural diagram of the prediction model of the probability of delirium occurrence based on the Bayesian network provided by the present invention.
[0026] Figure 4 This is a flow chart of extracting valid case data from the MIMIC-IV database in Example 1 of the present invention.
[0027] Figure 5 This is a flowchart of extracting valid case data from the eICU-CRD database in Example 1 of the present invention.
[0028] Figure 6 It is a schematic diagram of the structure of the prediction model after the probability of a certain node occurring when reasoning is performed based on the constructed prediction model in Example 1 of the present invention.
[0029] Figure 7 This is a schematic diagram of the structure of the prediction model after another node probability occurs when reasoning is performed based on the constructed prediction model in Example 1 of the present invention.
[0030] Figure 8 This is a schematic diagram of the architecture of the delirium occurrence probability prediction system based on the Bayesian network in Example 2 of the present invention.
[0031] Fig. 9 The ROC curves and AUROC values of the prediction model provided in Example 1 of the present invention and the other three models in the internal validation set.
[0032] Fig.10 The ROC curves and AUROC values of the prediction model provided in Example 1 of the present invention and the other three models in the external validation set. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0034] Example 1
[0035] Delirium is a common complication after coronary artery bypass grafting. The diagnosis of delirium after coronary artery bypass grafting is based on: (1) a positive CAM-ICU assessment result on either side of the patient during the ICU; (2) an ICDSC score greater than or equal to 4 at any time during the patient's stay in the ICU.
[0036] The CAM-ICU score includes the following four features: the first feature: acute changes or fluctuations in mental state; the second feature: inattention; the third feature: disordered thinking; the fourth feature: changes in the level of consciousness. When the patient has both the first and second features, and any of the third or fourth features is positive, delirium can be diagnosed (ie, the CAM-ICU assessment is positive).
[0037] The ICDSC score is another tool used to assess the delirium status of ICU patients. The full score is 8 points, and a score of ≥4 points indicates that the patient may have delirium. The ICDSC score is based on 8 assessment items, including acute changes or fluctuations in consciousness level, inattention, disorientation, hallucinations or illusions, psychomotor abnormalities, speech or thinking disorders, sleep-wake cycle disorders, and abnormal emotional state. Each item is 1 point, and a cumulative score of ≥4 points can be diagnosed as delirium.
[0038] A method for predicting the probability of delirium based on Bayesian network. Figure 1 As shown, it includes the following steps:
[0039] S1: Obtain valid case data that affect the probability of delirium after coronary artery bypass grafting, and preprocess the acquired valid case data to obtain a sample data set, and use part of the data in the sample data set as a training set and the rest of the data as a validation set.
[0040] In this embodiment, the training set and the validation set can be obtained by randomly dividing the data in the sample data set in a ratio of 7:3.
[0041] The valid case data were derived from all patients who underwent CABG surgery, and the following patient data were excluded from the patients who underwent CABG surgery: (1) patients under the age of 18; (2) patients who did not stay in the ICU after CABG surgery; (3) patients who were not admitted to the ICU for the first time; (4) patients who had no record of postoperative delirium assessment; and (5) patients whose delirium assessment result was not assessable.
[0042] The specific steps for preprocessing the acquired valid case data are as follows:
[0043] S11: The following data of each patient were extracted from the valid case data obtained: (1) demographic information; (2) vital signs and laboratory test results within 24 hours after admission to the ICU; (3) intervention treatment measures within 24 hours of admission to the ICU; (4) disease score within 24 hours of admission to the ICU; (4) comorbidities during the treatment of coronary heart disease.
[0044] 1. Demographic information
[0045] Demographic information generally includes: the patient's age, gender, height, and weight. At the same time, the body mass index (BMI) of each patient can be calculated based on the height and weight. In this embodiment, age can be grouped according to quartiles. BMI can be classified according to clinical thresholds.
[0046] 2. Vital signs and laboratory test results within 24 hours after admission to the ICU
[0047] Among them, vital signs are indicators used to judge the severity and criticality of the patient's condition. They may mainly include changes in heart rate, pulse, blood pressure, respiration, pain, blood oxygen, pupil and corneal reflex, etc. In this embodiment, vital signs can be classified according to clinical thresholds. Laboratory test results may include sodium ion concentration, chloride ion concentration, blood sugar level, etc. in the human body.
[0048] 3. Interventional treatment measures within 24 hours of ICU admission
[0049] Intervention treatment measures within 24 hours of ICU admission may include the following treatment methods: whether to perform mechanical ventilation on the patient, whether to use vasoactive drugs on the patient, whether to perform continuous renal therapy, whether to use propofol, whether to use midazolam, and whether to use dexmedetomidine. Among them, mechanical ventilation is a medical method that uses a ventilator to assist or completely replace the patient's spontaneous breathing. Continuous renal replacement therapy is one of the most commonly used blood purification technologies in critical care. Its clinical indications include acute renal failure, autoimmune diseases, hepatic encephalopathy, etc. Propofol is an organic compound, which is a short-acting intravenous anesthetic used for the induction and maintenance of general anesthesia. It is often used simultaneously with epidural or spinal anesthesia. It is also commonly used with analgesics, muscle relaxants and inhalation anesthetics. Midazolam is an organic compound with typical benzodiazepine It has a pharmacological activity similar to clonidine, and can produce anxiolytic, sedative, hypnotic, anticonvulsant and muscle relaxant effects. Dexmedetomidine is an effective α2-adrenaline receptor agonist, with an affinity for α2-adrenaline receptors that is 8 times higher than that of clonidine. It is clinically suitable for sedation of patients who are intubated and on ventilators during intensive care treatment.
[0050] (IV) Disease score during 24 hours of ICU stay
[0051] The disease scores for 24 hours of ICU stay include SOFA score, GCS score, RASS score and pain score. Among them, the definition of SOFA score is: SOFA score, also known as sequential organ failure score, is a scoring system for evaluating the degree of organ failure in patients. The definition of GCS score is: GCS score, also known as Glasgow Coma Scale, is a scoring system for evaluating the patient's state of consciousness, and is often used in the evaluation of patients with craniocerebral injury. The definition of RASS score is: RASS score, also known as sedation-agitation score, is a scoring system for evaluating the patient's sedation and agitation level, and is often used in the evaluation of patients in intensive care units.
[0052] Wherein, in step S11, the above index items in the sample data set may be extracted by using SQL language.
[0053] S12: Patient data with a missing rate of more than 30% are excluded, and the missing values in the patient data with a missing rate between 0% and 30% are multiple interpolated using the MICE algorithm to obtain interpolated patient data.
[0054] In this step, the reasons for excluding patient data with a missing rate of more than 30% are: (1) To maintain the integrity and reliability of the acquired data. Because when the data missing rate exceeds 30%, the integrity and reliability of the data will be seriously affected. In this case, if this part of the data is not excluded, the acquired data may not be sufficient to represent the patient's actual situation, which may easily mislead the subsequent analysis and cause deviations in the subsequent analysis results. (2) To improve the effectiveness of data statistical analysis. When performing statistical analysis, missing data will have a negative impact on the analysis results. A high proportion of missing data will reduce the effectiveness of statistical analysis and make the conclusions drawn from the analysis may not be representative. Therefore, in the actual operation process, it is necessary to delete data with a missing rate of more than 30% to improve the effectiveness of data statistical analysis. (3) It has a great impact on model training. In machine learning and predictive models, missing data will affect the training effect of the model. A high proportion of missing data may cause the model to be unable to effectively learn the patterns and relationships in the data, thereby reducing the prediction accuracy and generalization ability of the model. (4) Reduce the complexity of data processing. In the actual data processing process, complex filling methods are required to deal with data with high missing rates, such as interpolation, regression, multiple interpolation, etc. These methods not only increase the complexity of data processing, but also may introduce additional uncertainty and bias. (5) It will have an impact on clinical decision-making. In the medical field, clinical decisions based on incomplete or unreliable data may have adverse effects on patients' treatment and health management. Therefore, in order to ensure the scientificity and accuracy of clinical decisions, it is usually chosen to exclude data with too high missing rates.
[0055] In summary, through the description of the above five aspects, it can be seen that excluding patient data with a missing rate of more than 30% is to ensure the quality of the data and the reliability of the analysis results, thereby providing more accurate and reliable support for scientific research and clinical decision-making.
[0056] Secondly, in this step, the purpose of using the MICE algorithm for multiple imputation is as follows: (1) The MICE algorithm can handle data sets containing missing values for multiple variables. It establishes a series of regression models so that the missing values of each variable can be predicted and filled by the observed values of other variables. (2) The MICE algorithm can produce multiple complete data sets through multiple imputation, and the missing values of each data set are predicted based on the model. This method can better maintain the variability and original distribution characteristics of the data, and can better reflect the uncertainty of missing data compared to the single imputation method. (3) After multiple imputation by the MICE algorithm, multiple complete data sets can be obtained, and then these data sets can be analyzed and the results can be summarized. This approach can improve the accuracy and stability of the estimation of the imputed data set and reduce the bias caused by single imputation. (4) The MICE algorithm allows the use of different types of regression models to impute different variables, such as linear regression, logistic regression, polynomial regression, etc. This makes the MICE algorithm highly flexible when dealing with different types of data. (5) The MICE algorithm is suitable for processing missing data under various missing mechanisms, including missing completely at random (MCAR), missing at random (MAR), and missing not at random (MNAR).
[0057] In summary, the MICE interpolation method used in this embodiment has significant advantages in dealing with multiple missing values, maintaining data variability and distribution characteristics, improving estimation accuracy and stability, flexibility and applicability, etc.
[0058] S13: Discretize the continuous data of the indicator items in the interpolated patient data to obtain segmented data after discretization.
[0059] The results of discretization of the indicator items in the patient data as continuous data can be found in Table 1 below.
[0060] Table 1: Data table after discretization of continuous data in valid case patient data
[0061]
[0062]
[0063] Among them, the indicator items in this embodiment can be divided into categorical variables and continuous variables.
[0064] Categorical variables are those that can be classified or grouped, and their values are a limited set of categories or labels, such as gender (male, female), etc.
[0065] Continuous variables are variables that can take any value within a certain range. Their values can be decimals or fractions, and there are infinite possible values within the possible range. Continuous variables are usually used to represent measurements or quantities, such as temperature, height, weight, etc.
[0066] In this step, the values of the index items that are continuous values can be discretized. The purpose of discretization is as follows: (1) The prediction method of the probability of delirium based on the Bayesian network in the present invention is based on the Bayesian network, and the Bayesian network is a method based on a probabilistic graphical model, which usually requires the input data to be discrete. Therefore, when constructing the Bayesian network, the continuous data needs to be discretized so that the processed data can be applied to the Bayesian network. (2) By discretizing the data in the index items that are continuous data, the discretized data can greatly reduce the computer complexity and improve the calculation efficiency. When processing large-scale data, discretization can significantly reduce the consumption of computing resources and speed up the model training and prediction. (3) The discretized data can reduce the impact of noise and improve the generalization ability of the model. The discretized features have strong robustness to abnormal data, can effectively overcome the hidden defects in the data, and make the model more stable. (4) The discretized data can simplify the model structure and reduce the risk of model overfitting. The discretized features can be cross-referenced to further introduce nonlinearity and improve the model’s expressiveness. (5) The discretized data is easier for people to understand and apply.
[0067] In summary, the reason why the indicator items in this embodiment are discretized for continuous data is to meet the algorithm requirements, improve computing efficiency, enhance model generalization ability, simplify the model structure, and facilitate people's understanding and application.
[0068] S14: Process the indicator items of the patient data after difference interpolation that are categorical variables to obtain the frequency and percentage of each category in the categorical variable.
[0069] S2: Using each indicator item in the sample data set as a node and the influence between the indicator items as an edge to construct an initial prediction model for the probability of delirium after coronary artery bypass grafting based on a Bayesian network.
[0070] The method for constructing the initial prediction model comprises the following steps:
[0071] Obtain the importance ranking of each indicator item in the sample data set, and obtain the importance ranking diagram of the indicator items that affect the probability of delirium after coronary artery bypass grafting. When ranking the importance of each indicator item in the sample data set, it can generally be completed through the prior knowledge accumulated in the clinic. However, for the case of large data volume, data feature dimensions and data features, the complexity of using prior knowledge for manual rotation is very high. Therefore, the indicator items with the highest possible correlation with the results are selected, the coupling between data is reduced, and the data dimension is reduced to facilitate the construction of a prediction model for the probability of delirium after coronary artery bypass grafting based on the Bayesian network. Machine learning algorithms such as random forest (RF), XGBoost, LightGBM, and linear regression can be used to obtain the importance ranking of each indicator in the sample data set, and the feature domain determination of the Bayesian network construction is completed according to the ranking results.
[0072] In this embodiment, the LightGBM algorithm can be used to sort the importance of each indicator in the sample data set. The sorting result is as follows: Figure 2 As shown. Importance feature ranking is a function provided by the LightGBM algorithm, which is implemented by directly calling the function in its R package. After modeling using the LightGBM algorithm, we can obtain the importance ranking of each indicator item, which helps us understand which indicators contribute the most to the prediction function of the model. In our embodiment, the global variable importance can be used to obtain the importance ranking of each indicator item in the sample data set. Global variable importance is also called model-level variable importance, which measures the overall effect of each indicator item on model prediction within the entire data set. This measurement method is based on a partial dependency graph.
[0073] In this embodiment, a linear regression model can also be used to rank the importance of each indicator in the sample data set.
[0074] The first six indicator items are selected according to the importance ranking diagram of the indicator items that affect the probability of delirium after coronary artery bypass grafting, and the six indicator items are used as parent nodes of the initial prediction model. The six indicator items that affect the probability of delirium after coronary artery bypass grafting are directly associated with delirium characteristics through a whitelist mechanism.
[0075] In this step, select Figure 2The reasons for selecting the top 6 index items in the importance feature ranking are as follows: (1) Usually in the importance ranking diagram, the index items with higher importance scores contribute more to the predictive performance of the model. Selecting the top 6 important variables can maintain the high predictive performance of the prediction model for the probability of delirium after coronary artery bypass grafting constructed based on the Bayesian network, while also simplifying the model and improving the computational efficiency of the model. (2) In the process of constructing the prediction model of this embodiment, selecting a small number of important index items that affect the probability of delirium after coronary artery bypass grafting helps to enhance the interpretability of the constructed prediction model, making the model decision-making process more transparent, easy to understand and communicate. (3) In this embodiment, the selection of the top 6 index items in the importance ranking diagram is to use the knowledge of clinical experts to obtain that these 6 index items are key factors in actual clinical practice.
[0076] In addition, in this embodiment, the introduction of a whitelist mechanism helps to improve the stability and reliability of the constructed prediction model. Relying solely on data-driven methods may cause the constructed prediction model to be overfitted or unstable. In this embodiment, additional constraints can be provided based on the knowledge reserves of experts in this field (for example, some of the indicators have a direct relationship with delirium). The whitelist mechanism can ensure that these known relationships are retained during the structural learning process, rather than being ignored or misestimated. Therefore, by adding this prior information, the structure of the prediction model obtained through learning can be made more stable, making the final prediction model of the probability of delirium after coronary artery bypass grafting based on the Bayesian network more interpretable and easier for users to understand and verify.
[0077] The association between the six index items that affect the probability of delirium after coronary artery bypass grafting and the remaining index items that affect the probability of delirium after coronary artery bypass grafting is established through the MMHC algorithm to obtain a directed acyclic graph in the initial prediction model.
[0078] The initial prediction model is trained and verified using the training set and the verification set, and the model parameters that meet the performance index requirements after verification are retained to obtain an optimized prediction model; the training process includes:
[0079] The simplified directed acyclic graph is subjected to parameter learning by the maximum likelihood estimation method and using the training set to obtain a conditional probability table of each indicator item that affects the probability of delirium after coronary artery bypass grafting. The redundant nodes and edges in the initial directed acyclic graph are deleted in combination with the conditional probability table to obtain a simplified directed acyclic graph. The trained prediction model is then verified by the verification set, and the model parameters that meet the performance index requirements after verification are retained to obtain an optimized prediction model;
[0080] S4: Obtain patient case data to be predicted, preprocess the patient case data to be predicted, input the preprocessed patient case data with prediction into the optimized prediction model, and output the probability of the patient to be predicted developing delirium after coronary artery bypass grafting through the optimized prediction model.
[0081] Among them, the specific operation of obtaining the simplified directed acyclic graph can be performed as described below: select an empty or initial Bayesian network structure to start. Use statistical tests (such as Pearson chi-square test, mutual information, etc.) to detect the conditional independence between the various indicator items in the sample data set. According to the independence test results, an undirected graph, that is, a skeleton graph, is constructed, which contains all the edges that have not been deleted. Then, based on the directed acyclic graph of the initial prediction model, a scoring function is used to orient the subgraph around each node to form a partial directed graph. Then, a local search algorithm (such as Hill-Climbing) is used to optimize the entire network structure, and the scoring function is improved by adding, deleting or reverse transformation. On the basis of the local search algorithm, a global optimization algorithm is further used to find the optimal result, that is, a simplified directed acyclic graph is obtained. The scoring function of this part can be BIC, AIC, etc. The global optimization algorithm can be Tabu Search.
[0082] The MMHC algorithm is a hybrid algorithm that combines the advantages of constraint-based methods and score-based methods. The advantages of using the MMHC algorithm are as follows: (1) It combines conditional independence tests and search strategies to more effectively explore the network structure space, thereby finding a network structure that is consistent with both data and domain knowledge. (2) Through the conditional independence test, the MMHC algorithm can significantly narrow the search space and improve search efficiency.
[0083] In the parameter learning process of the Bayesian network, the conditional probability distribution of each node can be regarded as a linear regression model. Specifically, suppose we have a node X, and its parent node set is Pa(X), then the conditional probability distribution P(X|Pa(X)) of X can be expressed as a linear regression model, where X is the dependent variable and Pa(X) is the independent variable. In this way, we can transform the conditional probability distribution in the Bayesian network into a linear regression model, and then use the parameter estimation method in the linear regression model to perform parameter learning.
[0084] In this embodiment, the streamlined prediction model can be implemented in the following ways: (1) Before the prediction model is trained, the most important indicators are selected through feature selection technology, which can reduce the dimension of the constructed prediction model, reduce the complexity of the constructed prediction model, and improve the interpretability of the constructed prediction model. (2) By deleting redundant nodes and edges, the structure of the constructed prediction model can be simplified, the complexity of the model can be reduced, and the interpretability of the constructed prediction model can be improved. Therefore, in this embodiment, a balance is achieved between complexity and interpretability by streamlining the model structure.
[0085] In this embodiment, the optimized prediction model includes 15 index items and 24 directed edges. The 15 index items are: "whether the patient has diabetes (Diabetes)", "whether the patient has hypertension (Hypertension)", "whether the patient has chronic kidney disease (CKD)", "whether the amount of creatinine in the patient's body exceeds the normal range (Creatinine)", "whether the patient has congestive heart failure (CHF)", "whether the amount of urea nitrogen in the patient's body exceeds the normal range (BUN)", "whether the patient undergoes mechanical ventilation during treatment (Mechanical ventilation)", "whether the patient uses dexmedetomidine during treatment (Dexmedetomidine)", "whether the amount of sodium ions in the patient's body is within the normal range or exceeds the normal range or is lower than the normal range (Sodium)", "whether the amount of chloride ions in the patient's body is within the normal range or exceeds the normal range or is lower than the normal range (Chloride)", "whether the AG value in the patient's plasma is within the normal range or exceeds the normal range or is lower than the normal range (Anion gap)", "SOFA score", "GCS score", "RASS score", "age (age)".
[0086] Among them, the anion gap refers to the difference between the concentrations of unmeasured anions and unmeasured cations in plasma, and is an important indicator reflecting the acid-base balance in the body.
[0087] The following limiting criteria are made for the above 15 indicators:
[0088] 1. For the five indicators of "whether the patient has diabetes", "whether the patient has hypertension", "whether the patient has chronic kidney disease", "whether the patient has congestive heart failure", "whether the patient has mechanical ventilation during treatment" and "whether the patient has used dexmedetomidine during treatment", there are only two cases in each of these five indicators: "yes" or "no". Therefore, in the actual processing, the result of "yes" can be assigned a value of 1, and the result of "no" can be assigned a value of 0. That is, through this processing, the data of the above five indicators can be input into the prediction model for training.
[0089] 2. For the two indicators of "whether the amount of creatinine in the patient's body exceeds the normal range" and "whether the amount of urea nitrogen in the patient's body exceeds the normal range", the clinical reference range generally divides them into within the normal range and above the normal range. Normal is defined as within the normal range, and high is defined as above the normal range. Therefore, in the actual processing process, the data with "high" can be assigned a value of 1, and the result with "normal" can be assigned a value of 0.
[0090] 3. For the three indicators of "Is the amount of sodium ions in the patient's body within the normal range, above the normal range or below the normal range", "Is the amount of chloride ions in the patient's body within the normal range, above the normal range or below the normal range", and "Is the AG value in the patient's plasma within the normal range, above the normal range or below the normal range", the clinical reference range generally divides them into three situations: within the normal range, above the normal range, and below the normal range. Among them, normal is defined as normal, high is defined as above the normal range, and low is defined as below the normal range. Therefore, in the actual processing process, the value of "high" in the data can be assigned to 1, the value of "normal" can be assigned to 0, and the value of "low" can be assigned to 2. Specifically, for the amount of sodium ions in the patient's body, according to the clinical reference range, the amount of sodium ions in the patient's body less than or equal to 134mEq / L can be defined as below the normal range; the amount of sodium ions in the patient's body between 135mEq / L and 145mEq / L can be defined as the normal range; the amount of sodium ions in the patient's body greater than or equal to 146mEq / L can be defined as exceeding the normal range. For the amount of chloride ions in the patient's body, according to the clinical reference range, the amount of chloride ions in the patient's body can be defined as less than or equal to 97mEq / L as below the normal range; the amount of chloride ions in the patient's body between 98mEq / L and 107mEq / L is defined as the normal range; and the amount of chloride ions in the patient's body greater than or equal to 108mEq / L is defined as exceeding the normal range. For the AG value in the patient's plasma, according to the clinical reference range, the AG value in the patient's plasma less than or equal to 7mEq / L is defined as below the normal range; the AG value in the patient's plasma between 8mEq / L and 16mEq / L is defined as the normal range; and the AG value in the patient's plasma greater than or equal to 16mEq / L is defined as exceeding the normal range.
[0091] 4. Regarding the indicator item "whether the amount of creatinine in the patient's body exceeds the normal range", the clinical reference range generally uses 20mg / dl as the critical value, so the amount of creatinine in the patient's body is divided into "the amount of creatinine in the body is greater than 20mg / dl" and "the amount of creatinine in the body is less than or equal to 20mg / dl". Therefore, in the actual processing process, the data of "the amount of creatinine in the body is greater than 20mg / dl" can be assigned a value of 1, and the data of "the amount of creatinine in the body is less than 20mg / dl" can be assigned a value of 0.
[0092] 5. For the indicator item "SOFA score", it can be divided into five levels according to the quantile: the first level is SOFA score ≤ 3 points; the second level is SOFA score between 4 and 5 points; the third level is SOFA score of 6 points; the fourth level is SOFA score of 7 to 8 points; the fifth level is SOFA score ≥ 9 points. Therefore, in the actual processing process, the first level data can be assigned 0; the second level data can be assigned 1; the third level data can be assigned 2; the fourth level data can be assigned 3; the fifth level data can be assigned 4.
[0093] 6. The "RASS score" indicator can be divided into 4 levels based on clinical experience; the first level is RASS score ≤ -3 points; the second level is RASS score between -2 points and -1 points; the third level is RASS score 0 points; the fourth level is RASS score ≥ 1 point. Therefore, in the actual processing process, the first level data can be assigned 0; the second level data can be assigned 1; the third level data can be assigned 2; and the fourth level data can be assigned 3.
[0094] 7. The indicator "GCS score" can be divided into 4 levels according to clinical experience: the first level is GCS score between 3 and 8 points; the second level is GCS score between 9 and 12 points; the third level is GCS score between 13 and 14 points; the fourth level is GCS score of 15 points. Therefore, in the actual processing process, the first level data can be assigned 0; the second level data can be assigned 1; the third level data can be assigned 2; and the fourth level data can be assigned 3.
[0095] 8. For the indicator item "age", it can be divided into 4 levels according to the quantile: the first level is less than or equal to 59 years old; the second level is 60 to 66 years old; the third level is 67 to 74 years old; the fourth level is greater than or equal to 75 years old. Therefore, in the actual processing process, the first level data can be assigned 0; the second level data can be assigned 1; the third level data can be assigned 2; and the fourth level data can be assigned 3.
[0096] Through the above processing, the data of the above 15 indicators can be converted into a computer-readable form, so that they can be input into the prediction model for training. The trained prediction model is adjusted through the validation set, and after the adjustment, an optimized prediction model for the probability of delirium after coronary artery bypass grafting based on the Bayesian network is obtained. The specific structure can be referred to Figure 3 .
[0097] Finally, we can obtain the patient case data to be predicted and preprocess the patient case data to be predicted. Then, the preprocessed patient case data with prediction is input into the optimized prediction model, and the prediction model is optimized to output the probability of the patient to be predicted to suffer from delirium after coronary artery bypass grafting.
[0098] In this embodiment, a prediction model for the probability of delirium after coronary artery bypass grafting is constructed based on Bayesian analysis. Each indicator item in the model is represented by a node, and the relationship between nodes is connected by directed edges. The direction of the arrow indicates potential causal relationship or strong association. Figure 3 It can be seen that age, whether dexmedetomidine is used, the amount of anion gap, RASS score, GCS score and SOFA score are regarded as the parent nodes of delirium and are directly related to the occurrence of delirium. Whether mechanical ventilation is performed can be indirectly related to the occurrence of delirium by affecting the four indicators of whether dexmedetomidine is used, RASS score and GCS score. In the parent node of delirium, the three indicators of SOFA score, GCS score and RASS score also affect each other and then affect the occurrence of delirium.
[0099] In this embodiment, the advantages of using Bayesian network are as follows: (1) Bayesian network is a directed acyclic graph, whose nodes represent random variables and edges represent conditional dependencies between variables. This structure makes Bayesian network very concise and intuitive in representing probability relationships. In this embodiment, the probability of delirium after coronary artery bypass grafting can be displayed by constructing a prediction model, and in the prediction model of the probability of delirium after coronary artery bypass grafting constructed based on Bayesian network, each node and edge in the prediction model has a clear physical or medical meaning, so that the constructed prediction model has strong interpretability, which is convenient for doctors to understand and interpret the results of the model. (2) Bayesian network is based on Bayesian theorem, which can naturally deal with uncertain problems. For the clinical problem of the probability of delirium after coronary artery bypass grafting, many situations are uncertain, and Bayesian network can quantify these uncertainties, which can provide doctors with more accurate predictions and reasoning, so that doctors can make more reasonable treatment plans based on the predicted results. (3) Bayesian networks are highly flexible and scalable. They can be easily expanded to include more limited models, so they can handle problems with complex relationships between many variables. Since the probability of delirium after coronary artery bypass grafting is affected by many variables, it is applied to the problem of the probability of delirium after coronary artery bypass grafting. Because of its strong flexibility and scalability, with the continuous increase of medical data and the continuous updating of medical knowledge, the prediction model of the probability of delirium after coronary artery bypass grafting based on Bayesian networks can be adjusted and optimized accordingly, thereby improving the practicality of the constructed prediction model.
[0100] In addition, before constructing a prediction model for the probability of delirium after coronary artery bypass grafting, the inventors also compared the Bayesian network model with the XGBoost model and the LightGBM model, and obtained the following conclusions: (1) For the XGBoost model and the LightGBM model, they usually contain many parameters, and the settings of these parameters have a great impact on the performance of the model, and inappropriate parameter settings may cause the model to be overfitted or underfitted. Therefore, in this embodiment, the XGBoost model and the LightGBM model are not selected to construct a prediction model for the probability of delirium after coronary artery bypass grafting. (2) Although the XGBoost model and the LightGBM model can provide a certain degree of interpretability through methods such as feature importance ranking, their interpretability is still relatively weak compared with the Bayesian network. (3) The XGBoost model and the LightGBM model can handle a certain degree of uncertainty through methods such as probability prediction, but they may not be as good as the Bayesian network in quantifying uncertainty and performing complex reasoning. In summary, in clinical applications, Bayesian networks have advantages over XGBoost models and LightGBM models in terms of model simplicity, strong interpretability, strong ability to handle uncertainty, and flexible knowledge representation and reasoning. These advantages make Bayesian networks have great application potential in complex reasoning tasks such as medical diagnosis and treatment plan selection. Of course, in actual application, the appropriate algorithm can also be selected according to the specific problems to be solved and the characteristics of the data set.
[0101] In this embodiment, the source of the valid case data that affects the probability of delirium after coronary artery bypass grafting in step S1 can be obtained from the MIMIC-IV database and the eICU-CRD database. The MIMIC database contains information on all ICU patients admitted to the Beth Israel Deaconess Medical Center in the United States from 2008 to 2019. The eICU-CRD database is a multi-center ICU database in the United States, which contains data on 355 patients in 205 hospitals in the United States from 2014 to 2015. Both databases provide comprehensive information such as basic patient information, vital signs, laboratory tests, treatment and nursing. The patient's personal information in the database has been de-identified, so the patient's informed consent is exempted.
[0102] When valid case data are obtained from the above two databases, the following operations need to be performed: extract M valid case data that affect the probability of delirium after coronary artery bypass grafting from the MIMIC-IV database; then extract N valid case data that affect the probability of delirium after coronary artery bypass grafting from the eICU-CRD database; take the case data with the same indicator items in the M valid case data that affect the probability of delirium after coronary artery bypass grafting and the N valid case data that affect the probability of delirium after coronary artery bypass grafting, and this part of the indicator items is the indicator items in the sample data set preprocessed in step S1.
[0103] Among them, the valid case data obtained from the MIMIC-IV database can be used to train and internally verify the constructed prediction model; the valid case data obtained from the eICU-CRD database can be used to externally verify the constructed model. Therefore, when selecting data from these two databases, both the test set and the training set come from the MIMIC-IV database.
[0104] In this embodiment, the total number of patients in the MIMIC-IV database is 5956, and the total number of patients in the eICU-CRD database is 3945. If valid case data needs to be obtained from these two databases, the following patient data needs to be excluded from the patients who underwent CABG surgery in these two databases: (1) patients under the age of 18; (2) patients who did not stay in the ICU after CABG surgery; (3) patients who were not admitted to the ICU for the first time; (4) patients without a postoperative delirium assessment record; (5) patients whose delirium assessment result was unable to be assessed. The specific exclusion process can be referred to Figure 4 and Figure 5 .
[0105] After excluding the data from the two databases, we finally selected 3708 valid case data of CABG patients who met the requirements from the MIMIC-IV database. Please refer to Figure 4 , Figure 4 This is a flowchart of how to select valid case data from the MIMIC-IV database. Among the selected valid case data, 3078 patients did not develop delirium, 630 patients developed delirium, and the probability of delirium was 17%. 529 valid case data of CABG postoperative patients who met the requirements were selected in the eICU-CRD database. Please refer to Figure 5 , Figure 5 This is a flowchart of how to select valid case data from the eICU-CRD database. Among the selected valid case data, the number of patients without delirium was 450, the number of patients with delirium was 79, and the probability of delirium was 14.9%.
[0106] In addition, in this embodiment, the same indicator items in the patient baseline data in the two databases are compared to obtain Table 2.
[0107]
[0108]
[0109] When the MIMIC-IV database and the eICU-CRD database are selected, the extracted indicators are the same. The indicator items in the valid patient data extracted from the two databases are continuous data, and the differences in these continuous data in the two databases can be statistically compared using the Mann-Whitney U test. Because the Mann-Whitney U test is a non-parametric statistical test commonly used in clinical research, it is mainly used to compare the differences between two independent samples or groups. When comparing the differences between the indicator items contained in two independent databases, it does not depend on the distribution form of the data, and is particularly suitable for comparing such data that do not satisfy the normal distribution. It can evaluate whether two indicator items come from the same database, so as to determine whether there are significant differences between the two indicator items. At the same time, the differences in the indicator items belonging to categorical variables in the two databases can also be evaluated by the chi-square test or Fisher's exact test.
[0110] Among them, in the process of statistical analysis of data, R4.1.3 and STATA15.1 can be used, and P < 0.05 is considered statistically significant.
[0111] In addition, the prediction model of the probability of delirium after coronary artery bypass grafting constructed in this embodiment based on the Bayesian network can also be used for reasoning and prediction. It can calculate the probability of delirium under a specific condition by combining existing evidence and data.
[0112] For example, when the conditional probability of the indicator item RASS score being 0 is 100%, the probability of delirium occurrence output by the prediction model of this embodiment is 20%. Figure 6 .
[0113] This inference function needs to be combined with Figure 3 and Figure 6 By comparison, we can see that: through the setting of evidence, the conditional probability of a RASS score of "0" is set to 100% here, and the conditional probabilities of the discretized categories in the other RASS scores are all 0; because after the conditional probability changes, the posterior probability of the relevant nodes will be recalculated according to the conditional probability table in the Bayesian network, that is, the probability of delirium will be recalculated. Figure 3 and Figure 6 It can be seen that the probability of delirium has been reduced from the original 29% to 20%.
[0114] Through evidence setting, the conditional probability of "no" in the indicator item of whether mechanical ventilation was performed was set to 100% (i.e., no mechanical ventilation was performed). When other variables did not change, the probability of using dexmedetomidine decreased from 24% to 16%, the probability of RASS score of 0 increased from 47% to 65%, and the probability of delirium finally decreased from 29% to 21%. For details, please refer to Figure 7 .
[0115] Among them, the association between whether patients are mechanically ventilated and delirium has been confirmed in many studies, especially in ICU patients. Figure 3 and Figure 7 It can be seen from the analysis that our prediction model shows that mechanical ventilation of patients may increase the probability of delirium by affecting the use of sedatives and the depth of sedation. And the prediction model of this embodiment shows that the probability of delirium can be reduced by reasonably reducing the mechanical ventilation time, the use of sedatives and the depth of sedation.
[0116] Among them, the relationship between the use of sedatives and the incidence of delirium has also attracted much attention in clinical research. The use of drugs such as dexmedetomidine has been considered to increase the risk of delirium. The use of other sedatives, such as dexmedetomidine, is controversial as to whether it affects the risk of delirium. Dexmedetomidine, as a selective α2 adrenergic receptor agonist, has been considered in some studies to reduce the duration of mechanical ventilation and the incidence of delirium in non-cardiac postoperative patients. However, the results of other randomized controlled trials have shown that the use of dexmedetomidine does not reduce the incidence of delirium. In addition, the DECADE study found that the use of dexmedetomidine did not reduce the incidence of postoperative delirium in cardiac surgery patients, so it is not recommended to use dexmedetomidine to reduce the incidence of postoperative delirium in cardiac surgery patients. In our study, through the prediction model constructed in this embodiment, we found that the use of dexmedetomidine is directly related to the incidence of delirium, and the prediction model suggests that the use of dexmedetomidine may increase the risk of delirium in specific patient groups.
[0117] In addition, existing studies have not yet clarified the relationship between sedation depth and the risk of delirium. However, through the inference of the prediction model we constructed, the results show that reducing the depth of sedation may help reduce the incidence of delirium after coronary artery bypass grafting.
[0118] The above speculations can provide a possible theoretical basis for formulating clinical intervention measures, but it should be noted that this conclusion is only based on the prediction model of this embodiment, which still has certain differences with the data from randomized controlled trials.
[0119] It is understandable that other influencing indicators in the prediction model, such as age, GCS score, SOFA score, whether the patient has comorbidities, electrolytes in the patient's body, etc., have been confirmed to be correlated with delirium in some studies of risk indicators and prediction models. It is worth noting that many of these indicators are adjustable. By inferring the prediction model in our embodiment, these modifiable indicators can be adjusted to evaluate the potential impact on the risk of delirium, thereby providing a basis for doctors to develop personalized intervention measures, helping doctors optimize patient management, and thus reducing the risk of delirium in patients after coronary artery bypass grafting.
[0120] In summary, the prediction model for the probability of delirium after coronary artery bypass grafting based on Bayesian network constructed in the present invention not only has good prediction performance, but also has high interpretability, providing an effective tool for the early identification and intervention of delirium after coronary artery bypass grafting, and has potential clinical application value.
[0121] In addition, in order to facilitate clinical application and promotion, we built an application for the probability of delirium after coronary artery bypass grafting based on Bayesian network through the Shiny framework in R language. The application allows users to input indicators that affect the probability of delirium after coronary artery bypass grafting into the constructed prediction model, such as age, whether to use dexmedetomidine, RASS score, etc. After entering these indicators, the probability of delirium in patients can be calculated through the constructed prediction model. In addition, the application also provides a visual display of the model derivation process, intuitively presents the relationship between the various indicators, and displays the performance evaluation results of the prediction model (such as ROC curve and AUROC value).
[0122] Example 2
[0123] Based on the solution of Example 1, this example further provides a prediction system for the probability of delirium occurrence based on a Bayesian network. The system uses the prediction model for the probability of delirium occurrence after coronary artery bypass grafting based on a Bayesian network in Example 1 to predict the probability of delirium occurrence after coronary artery bypass grafting. Figure 8 As shown, the prediction system for the probability of delirium occurrence based on the Bayesian network includes: a data set construction module, a data preprocessing module, a model construction module and a prediction module.
[0124] Among them, the dataset construction module is used to construct a dataset that affects the probability of delirium after coronary artery bypass grafting.
[0125] The data preprocessing module preprocesses the acquired data set that affects the probability of delirium after coronary artery bypass grafting to obtain a sample data set, and uses a part of the data in the sample data set as a training set and the rest of the data as a validation set.
[0126] A model building module, which is used to build a prediction model that affects the probability of delirium after coronary artery bypass grafting; the constructed prediction model is trained through the training set, and the trained prediction model is adjusted through the validation set, and after the adjustment, an optimized prediction model for the probability of delirium after coronary artery bypass grafting based on a Bayesian network is obtained;
[0127] The prediction module obtains patient case data to be predicted, preprocesses the patient case data to be predicted, inputs the preprocessed patient case data with prediction into the optimized prediction model, and outputs the probability of the patient to be predicted to develop delirium after coronary artery bypass grafting through the optimized prediction model.
[0128] Example 3
[0129] This embodiment provides a prediction device for the probability of delirium based on a Bayesian network, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, a prediction system for delirium after coronary artery bypass grafting based on a Bayesian network as in Embodiment 2 is created, and then the system is used to predict the probability of delirium in patients after coronary artery bypass grafting.
[0130] The Bayesian network-based delirium probability prediction device provided in this embodiment is essentially a computer device, which can be a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) capable of executing a program.
[0131] The computer device of this embodiment at least includes but is not limited to: a memory and a processor that can be connected to each other through a system bus. In this embodiment, the memory (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory can be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. Of course, the memory can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is generally used to store an operating system and various application software installed on the computer device. In addition, the memory can also be used to temporarily store various types of data that have been output or are to be output.
[0132] The processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor is generally used to control the overall operation of a computer device.
[0133] Performance Testing
[0134] In order to verify the effectiveness of the Bayesian network-based prediction method for the probability of delirium after coronary artery bypass grafting provided by the present invention, technicians carried out relevant verification experiments.
[0135] 1. Comparative verification test
[0136] The technicians compared the ROC curves and AUROC values of the four models, including the prediction model of the probability of delirium after coronary artery bypass grafting based on the Bayesian network (Bayesian Network with MMHC) provided by the present invention, the prediction of the probability of delirium after coronary artery bypass grafting by the LightGBM model, the prediction of the probability of delirium after coronary artery bypass grafting by the Logistic Regression model, and the prediction of the probability of delirium after coronary artery bypass grafting by the Bayesian network-based hill climbing algorithm (Bayesian Network with HC), and obtained the following results: Fig. 9 and Fig.10 .
[0137] AUROC is an indicator for evaluating the performance of a binary classification model. It measures the performance of the model at different thresholds and reflects the model's ability to distinguish between positive and negative classes. The AUROC value range is generally between 0.5 and 1. An AUROC value of 0.5 indicates that the model's performance is the same as random guessing; an AUROC value of 1 indicates that the model has perfect discrimination ability. Therefore, in the actual comparison process, the larger the AUROC value, the better the prediction effect of the prediction model.
[0138] in Fig. 9 The ROC curves and AUROC values of the above four different models in the internal validation set; Fig.10 The ROC curves and AUROC values of the above four different models in the external validation set.
[0139] pass Fig. 9 and Fig.10 It can be seen that the prediction model for predicting the probability of delirium after coronary artery bypass grafting using the LightGBM model has an AUROC of 0.91 in the internal validation set and an AUROC of 0.7 in the external validation set. Therefore, when constructing such prediction models, we generally use the LightGBM model as the benchmark for the best performance of the prediction model. Therefore, we compare the remaining three models based on this benchmark and find that the prediction model constructed in this embodiment has an AUROC of 0.82 in the internal validation set and an AUROC of 0.66 in the external validation set. The prediction model for predicting the probability of delirium after coronary artery bypass grafting using the LR model has an AUROC of 0.78 in the internal validation set and an AUROC of 0.65 in the external validation set. The prediction model using the Bayesian Network with HC has an AUROC of 0.82 in the internal validation set and an AUROC of 0.65 in the external validation set. It can be concluded that when the above three prediction models are compared with the performance of the LightGBM prediction model as a benchmark, the performance indicators of the prediction model for the probability of delirium after coronary artery bypass grafting based on the Bayesian network provided by the present invention are true and reliable, and the prediction model for the probability of delirium after coronary artery bypass grafting based on the Bayesian network provided by the present invention can also have interpretability and reasoning functions, while the LightGBM prediction model does not have the above functions. Therefore, the prediction model for the probability of delirium after coronary artery bypass grafting based on the Bayesian network provided by the present invention can well predict the probability of delirium after coronary artery bypass grafting, and use the predicted results to identify patients with high risk of delirium after coronary artery bypass grafting at an early stage, so that medical staff can optimize perioperative management through the prediction results.
[0140] In addition, in this embodiment, the accuracy, sensitivity, specificity, precision, F1 score and other performance of the above four models are tested, and the data shown in Table 3 are obtained.
[0141] Table 3 shows the performance test of the four models during internal and external validation.
[0142]
[0143] As can be seen from Table 3, although the accuracy, sensitivity and specificity of the prediction model for the occurrence probability of delirium after coronary artery bypass grafting based on the Bayesian network (Bayesian Network with MMHC) provided by the present invention are lower than those of the LightGBM prediction model in the internal validation process, they are better than those of the Logistic Regression model and the Bayesian Network with HC prediction model, indicating that the performance indicators of the Bayesian Networkwith MMHC prediction model constructed by the present invention are reliable and meet the requirements. In addition, the prediction model for the occurrence probability of delirium after coronary artery bypass grafting based on the Bayesian network (Bayesian Network with MMHC) provided by the present invention has higher accuracy, sensitivity, specificity, precision and F1 score in the external validation process than the LogisticRegression model; and the prediction model for the occurrence probability of delirium after coronary artery bypass grafting based on the Bayesian network (Bayesian Network with MMHC) provided by the present invention has higher accuracy and F1 score in the external validation process than the LightGBM prediction model, indicating that the prediction model for the occurrence probability of delirium after coronary artery bypass grafting based on the Bayesian network provided by the present invention has high accuracy, thereby improving the decision-making quality of the constructed prediction model, and also enhancing the user's trust in the constructed prediction model.
[0144] In addition, in machine learning models, the accuracy, F1 score, and AUROC (Area Under the Receiver Operating Characteristic Curve) of different algorithms (such as Logistic Regression and LightGBM) can be used as a reference to tune the model parameters and select the appropriate model according to different usage scenarios.
[0145] The above describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and the specification only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for predicting the probability of delirium based on a Bayesian network, characterized in that: It includes the following steps: S1: Obtain valid case data that affect the probability of delirium after coronary artery bypass grafting, and preprocess the acquired valid case data to obtain a sample data set; use part of the data in the sample data set as a training set, and the rest of the data as a validation set; S2: Using each indicator item in the sample data set as a node and the influence between the indicators as an edge to construct an initial prediction model for the probability of delirium after coronary artery bypass grafting based on a Bayesian network; The method for constructing the initial prediction model comprises the following steps: S21: Obtain the importance ranking of each indicator item in the sample data set, and obtain an importance ranking diagram of the indicator items that affect the probability of delirium after coronary artery bypass grafting; S22: selecting the first six indicator items according to the importance ranking diagram of the indicator items affecting the probability of delirium after coronary artery bypass grafting, taking the six indicator items as parent nodes of the initial prediction model, and establishing a direct association between the six indicator items affecting the probability of delirium after coronary artery bypass grafting and delirium characteristics through a whitelist mechanism; S23: establishing a correlation between the six index items that affect the probability of delirium after coronary artery bypass grafting and the remaining index items that affect the probability of delirium after coronary artery bypass grafting to obtain a directed acyclic graph in the initial prediction model; S3: Using the training set and the validation set to train and validate the initial prediction model, and retaining the model parameters that meet the performance index requirements after validation, to obtain an optimized prediction model; the training process includes: S31: performing parameter learning on the simplified directed acyclic graph using the training set by using the maximum likelihood estimation method to obtain a conditional probability table of each indicator item that affects the probability of delirium after coronary artery bypass grafting; S32: Deleting redundant nodes and edges in the initial directed acyclic graph in combination with the conditional probability table to obtain a simplified directed acyclic graph; S33: Verifying the trained prediction model through a validation set, retaining the model parameters that meet the performance index requirements after verification, and obtaining an optimized prediction model; S4: Obtain patient case data to be predicted, preprocess the patient case data to be predicted, input the preprocessed patient case data with prediction into the optimized prediction model, and output the probability of the patient to be predicted developing delirium after coronary artery bypass grafting through the optimized prediction model.
2. The method for predicting the probability of delirium based on a Bayesian network as claimed in claim 1, characterized in that: The valid case data were derived from all patients who underwent CABG surgery, and data corresponding to the following situations were excluded: (1) patients under the age of 18; (2) patients who did not stay in the ICU after CABG surgery; (3) patients who were not admitted to the ICU for the first time; (4) patients without a record of postoperative delirium assessment; and (5) patients whose delirium assessment result was not assessable.
3. The method for predicting the probability of delirium based on Bayesian network according to claim 1, characterized in that: The preprocessing of the effective case data comprises the following steps: S11: Extract the following data of each patient from the acquired valid case data: (1) Demographic information; (2) vital signs and laboratory test results within 24 hours after ICU admission; (3) interventional treatment measures within 24 hours of ICU admission; (4) disease score during 24-hour ICU stay; (5) concurrent diseases during treatment of coronary heart disease; S12: Patient data with a missing rate of more than 30% are excluded, and the missing values in the patient data with a missing rate between 0% and 30% are multiple interpolated using the MICE algorithm to obtain the interpolated patient data; S13: discretizing the continuous data of the indicator items in the interpolated patient data to obtain segmented data after discretization; S14: Process the indicator items of the patient data after difference interpolation that are categorical variables to obtain the frequency of each category in the categorical variable.
4. The method for predicting the probability of delirium based on Bayesian network according to claim 3, characterized in that: Demographic information included age, sex, height, and weight; intervention treatment measures within 24 hours of ICU admission included whether mechanical ventilation, continuous renal replacement therapy, vasoactive drugs, propofol, midazolam, and dexmedetomidine were performed; disease scores within 24 hours of ICU admission included SOFA score, GCS score, RASS score, and pain score; comorbidities during treatment of coronary heart disease included whether the patient had hypertension, diabetes, congestive heart failure, and stroke.
5. The method for predicting the probability of delirium based on Bayesian network according to claim 4, characterized in that: Vital signs and BMI were classified according to clinical thresholds; laboratory test results were classified according to clinical reference ranges; age and SOFA scores were grouped according to quartiles; GCS scores, RASS scores, and pain scores were discretized based on clinical experience.
6. The method for predicting the probability of delirium based on Bayesian network according to claim 1, characterized in that: The six indicator items corresponding to the six parent nodes are age, whether mechanical ventilation is performed, the value of the anion gap in the patient's body, RASS score, GCS score and SOFA score.
7. The method for predicting the probability of delirium based on Bayesian network according to claim 1, characterized in that: The method for obtaining the importance ranking of each indicator item in the sample data set is one of the random forest algorithm, XGBoost algorithm and LightGBM algorithm.
8. The method for predicting the probability of delirium based on Bayesian network according to claim 1, characterized in that: In step S23, the MMHC algorithm is used to establish a correlation between the six index items that affect the probability of delirium after coronary artery bypass grafting and the remaining index items that affect the probability of delirium after coronary artery bypass grafting.
9. A prediction system for the probability of delirium based on a Bayesian network, characterized in that: The method adopts the trained prediction model in the method for predicting the probability of delirium occurrence based on the Bayesian network as described in any one of claims 1 to 8 to predict the probability of delirium occurrence after coronary artery bypass grafting. The prediction system for the probability of delirium occurrence based on the Bayesian network includes: A data set construction module, which is used to obtain valid case data that affects the probability of delirium after coronary artery bypass grafting; The data preprocessing module preprocesses the acquired valid case data affecting the occurrence of delirium after coronary artery bypass grafting to obtain a sample data set, and uses a part of the data in the sample data set as a training set and the rest of the data as a validation set; A model building module, which is used to build a prediction model that affects the probability of delirium after coronary artery bypass grafting; the constructed prediction model is trained through the training set, and the trained prediction model is adjusted through the validation set, and after the adjustment, an optimized prediction model for the probability of delirium after coronary artery bypass grafting based on a Bayesian network is obtained; The prediction module obtains patient case data to be predicted, preprocesses the patient case data to be predicted, inputs the preprocessed patient case data with prediction into the optimized prediction model, and outputs the probability of the patient to be predicted to develop delirium after coronary artery bypass grafting through the optimized prediction model.
10. A device for predicting the probability of delirium based on a Bayesian network, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for predicting the probability of occurrence of delirium based on a Bayesian network as described in any one of claims 1 to 8.