SBT success rate real-time prediction method based on integrated model
Through integrated model and feature screening technology, the problem of low subjectivity and accuracy of SBT success rate prediction is solved, real-time prediction and feature extraction are realized, prediction accuracy and model stability are improved, and data missing in different patients are suitable for the situation of data loss. Clinician decision-making.
Patent Information
- Application Number
- CN202411097578.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-17
AI Technical Summary
The existing SBT success rate prediction methods rely on the clinical experience of doctors and artificial intelligence models, which have problems with low subjectivity and prediction accuracy, and the medical indicators of different hospitals are not uniform, resulting in underfitting or overfitting the model, affecting the prediction. Accuracy.
Using the real-time prediction method of SBT success rate based on the integrated model, by screening and integrating conventional respiratory variables, using the XG-GA-LightGBM model for feature screening and model training, establishing a decision module, and combining genetic algorithms to improve the LightGBM model to achieve real-time prediction and Feature extraction.
It improves the prediction accuracy of SBT success rate, is suitable for data missing in different patients, simplifies the model, enhances the universality and stability of predictions, reduces waste of medical resources, and assists clinicians in making decisions.
Smart Images

Figure CN119138858A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for predicting the success rate of a SBT, and in particular to a method for real-time prediction of the success rate of a SBT based on an integrated model. Background Art
[0002] The prediction of the success rate of spontaneous breathing trials (SBTs) is an important topic in the clinical practice of respiratory medicine. Currently, the prediction of the success rate of SBTs mostly relies on the clinical experience of doctors, combined with the patient's short-term ventilator data and vital signs, and through clinical experience, or the use of artificial intelligence methods to predict the ability of intubated patients to fully tolerate spontaneous breathing after weaning.
[0003] The existing manual judgment methods based on clinical experience are mostly defined by experts based on pathophysiology risk factors, using T-tubes or low-level supported spontaneous breathing modes for patients receiving invasive mechanical ventilation, and then using clinical expertise to statistically analyze the reasons for possible SBT failure in the current situation, and comprehensively predict whether SBT is successful. Using this judgment method, doctors often need to pay attention to real-time information on changes in the patient's condition, so as to quickly and accurately take corresponding treatment measures and reasonably allocate medical resources; however, the existing manual methods of predicting the success of SBT have many disadvantages, and often require every medical staff to undergo professional training and have sufficient clinical experience, which will result in a waste of medical resources; and the prediction process is highly subjective and prone to prediction bias.
[0004] Existing artificial intelligence methods usually use laboratory data and vital signs from multiple sources such as the period before the planned SBT of intubated patients to train models based on improved logistics model algorithms to predict the success rate of SBT after this period. Since different hospitals can examine different medical indicators, different patients need to examine different information, which is difficult to achieve at the clinical level, it lacks practical application value; and in the process of deep learning to determine the success rate of SBT experiments, only applying a single model training often leads to underfitting or overfitting of the model, which ultimately leads to negative effects such as reduced prediction accuracy. Summary of the invention
[0005] In order to solve the deficiencies of the above technologies, the present invention provides a real-time prediction method for SBT success rate based on an integrated model.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a real-time prediction method of SBT success rate based on an integrated model, comprising the following steps:
[0007] Step S1: Filter the data implementing SBT as sample data, and integrate the sample data as a basic database;
[0008] Step S2: Use routine variables of respiratory department as candidate routine variables; use candidate routine variables as features; select 2 hours as data window to slice and annotate routine clinical data, i.e. candidate routine data, and use half an hour as a small range window to split the labeled candidate routine data slices, and obtain the model routine data adopted by the real-time prediction model of SBT success rate, i.e. XG-GA-LightGBM model after preprocessing;
[0009] Step S3: candidate regular variables select model regular variables based on the XGBoost model;
[0010] Step S4: Improve the LightGBM model based on the genetic algorithm GA and establish the decision module in the XG-GA-LightGBM model;
[0011] Step S5: Based on the model regular variables in step S3 and the decision module in step S4, perform model training of the XG-GA-LightGBM model and obtain the XG-GA-LightGBM model;
[0012] Step S6: Based on the model regular variables in step S3, extract and preprocess the regular data slices 2 hours before this moment as sample data slices;
[0013] Step S7: Input the sample data slices into the XG-GA-LightGBM model; the output value is the predicted value of the success rate of SBT at the current moment. If the output value is greater than the set threshold, it is predicted that SBT at the current moment is successful. If the output value is less than the set threshold, it is predicted that SBT at the current moment is a failure.
[0014] Furthermore, in step S1, the data of SBT are screened as sample data according to the inclusion criteria and exclusion criteria of the clinical trial.
[0015] Furthermore, obtaining the model conventional data in step S2 includes the following steps:
[0016] S21: arranging the data of candidate regular variables, namely candidate regular data;
[0017] S211: Summarize candidate routine variables, i.e., summarize the routine test variables before the SBT experiment;
[0018] S212: extracting corresponding data of each candidate conventional variable based on the basic database, and recording information of data acquisition timestamp of corresponding data of each candidate conventional variable;
[0019] S213: sorting the data corresponding to each candidate regular variable according to the order of collection time to generate each group of candidate regular data;
[0020] S22: Generate features, slice and annotate candidate regular data;
[0021] S221: Slice the candidate routine data; select 2 hours as the data window, and predict the probability of successful implementation of SBT according to clinical experience based on the data of each candidate routine variable within 2 hours;
[0022] S222: After the candidate regular data is sliced, it includes positive samples and negative samples. For a failed SBT experiment, the data within 2 hours before the SBT failure is intercepted as a negative sample, and the label of the negative sample is 0. For a successfully implemented SBT experiment, the data within 2 hours before the SBT success is intercepted as a positive sample, and the label of the positive sample is 1.
[0023] S223: Slice the labeled candidate regular data and divide them into a small range window of half an hour. Calculate the average, minimum, maximum, sum, and median of the divided data segments respectively, and combine them in the order of average, minimum, maximum, sum, and median to generate the actual features of the model;
[0024] S23: preprocessing the labeled candidate regular data slices;
[0025] S24: Extract the data corresponding to each regular data variable in the preprocessed candidate regular data slice as a feature, normalize all the feature values, and generate a model data slice; the positive sample label in the model data slice is the same as the positive sample label in the candidate regular data slice in S222; the negative sample label in the model data slice is the same as the negative sample label in the candidate regular data slice in S222.
[0026] Furthermore, the routine testing variables of medical staff for intubated patients in the respiratory department in S211 before the SBT experiment included 24 variables, namely age, gender, marital status, heart rate, blood oxygen, blood gas, respiratory rate, respiratory status, cardiac ejection fraction, positive and negative status of input and output, oral pressure or intrathoracic pressure for 0.1 second of inspiration when air inlet is closed, RASS sedation level assessment form, maximum inspiratory pressure, diaphragm thickness, diaphragm mobility, carbon dioxide partial pressure, blood oxygen saturation, pH, lung compliance, dopamine dosage, epinephrine dosage, tidal volume, flow rate, and inspired gas temperature.
[0027] Furthermore, in S23, the candidate regular data slices are preprocessed, specifically including the following steps:
[0028] S231: Eliminate candidate regular variables with missing corresponding data exceeding 90% to improve the quality of candidate regular data;
[0029] S232: The candidate regular data are normalized using the Z-Score standardization method. The normalized candidate regular data can eliminate the adverse effects on the XG-GA-LightGBM model caused by the dimension difference;
[0030] S233: Convert the non-numeric data in the candidate regular data into numeric data by using a one-hot encoding method.
[0031] Furthermore, in step S3, selecting model regular variables based on the XBoost model includes the following steps:
[0032] S31: Select 70% of the candidate regular data as the feature screening training set, and the remaining 30% of the data as the test set;
[0033] S32: Build a feature forgetting module based on the XGBoost model; establish the feature screening module of the XG-GA-LightGBM model by feature screening training set data samples. The objective function of feature screening is:
[0034]
[0035] Among them, loss is the loss function; Ω(f t ) is the regularization term; A is the constant term, which is the known model complexity of t-1 before the t-th step; is the predicted value of the new tree; y t is the sum of the fruits of the tree;
[0036] S33: Bring the features in S24 into the feature screening module respectively, calculate the marginal contribution of the features through the interpretable machine learning library, take the average of all marginal contributions of each feature, and record it as the contribution of the feature;
[0037] S34: Eliminate candidate regular variables whose contribution is less than the set threshold, and use the remaining variables as model regular variables.
[0038] Furthermore, in S32, the objective function L of feature screening is calculated by combining the greedy algorithm and the approximate algorithm. t In the case of a drop, iterate and loop to split and add branches; the iteration stops when one of the following conditions is met:
[0039] S331: When the gain after adding the branch is less than the set threshold, pre-pruning is performed;
[0040] S332: When the tree depth reaches the maximum depth of the hyperparameter max-depth;
[0041] S333: When the sum of the weights of the training set data samples is less than the number of samples in the leaf node of the hyperparameter min_child_weight.
[0042] Furthermore, in step S4, a decision module is established, including the following steps:
[0043] Step S41: For the feature set after the feature screening module, select AUC as the evaluation indicator, randomly generate multiple groups of hyperparameter settings of the LightGBM model, and initialize the population. The initialization parameters include crossover probability and mutation probability;
[0044] Step S42: define an optimization function, and the optimization function input is a hyperparameter; train the LightGBM model based on the optimization function, and calculate the AUC value as the fitness value;
[0045] Step S43: Use the roulette algorithm to implement the selection mechanism and allocate the selection probability according to the fitness value;
[0046] Step S44: randomly select two parents, exchange parameter settings at the parameter demarcation point, and perform crossover mutation operations to increase population diversity;
[0047] Step S45: perform selection and crossover mutation operations for 100 iterations; if the fitness value is greater than 0.90, terminate the algorithm; if the fitness value is less than or equal to 0.90, select the optimal fitness value;
[0048] Step S46: Select the parameters corresponding to the optimal fitness value, perform training, evaluate the performance of the improved LightGBM model on the test set in S31, and obtain the decision module.
[0049] Furthermore, in step S5, model training of the XG-GA-LightGBM model is performed, including the following steps:
[0050] S51: taking 70% of the candidate regular data slices and annotations in step S2 as the model training set, and the remaining 30% of the candidate regular data slices and annotations as the validation set;
[0051] S52: The model training set calculates the optimal hyperparameters of the SBT success rate prediction model based on the LightGBM model improved by the genetic algorithm. The output of the model verification set is the success rate of SBT at the current moment. The threshold is set to 0.5. If it is greater than the set threshold, it is judged that the SBT is successfully implemented. If it is less than the set threshold, it is judged that the SBT fails. Then the optimal hyperparameters are adjusted to obtain the XG-GA-LightGBM model.
[0052] Furthermore, in S52, the optimal hyperparameters are adjusted based on iterative feedback.
[0053] The present invention discloses a real-time prediction method for the success rate of SBT based on an integrated model. The data of routine variables of the respiratory department are developed and applied to obtain comprehensive information of patients and capture features that are conducive to the prediction of the success rate of SBT. Based on data within 2 hours, the success rate of SBT is predicted based on the XG-GA-LightGBM model, which can not only achieve real-time prediction, but also be applicable to situations where data is missing in reality, and the prediction accuracy is higher. The candidate routine data slices after annotation are divided into a small range window of half an hour, so that the features are more universal; by setting a feature screening module, the features with low contribution can be eliminated and the model can be simplified. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0055] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0056] A real-time prediction method for SBT success rate based on an integrated model comprises the following steps:
[0057] Step S1: Filter the data implementing SBT as sample data, and integrate the sample data as a basic database;
[0058] Step S2: Use routine variables of respiratory department as candidate routine variables; use candidate routine variables as features; select 2 hours as data window to slice and annotate routine clinical data, i.e. candidate routine data, and use half an hour as a small range window to split the labeled candidate routine data slices, and obtain the model routine data adopted by the real-time prediction model of SBT success rate, i.e. XG-GA-LightGBM model after preprocessing;
[0059] Step S3: candidate regular variables select model regular variables based on the XGBoost model;
[0060] Step S4: Improve the LightGBM model based on the genetic algorithm GA and establish the decision module in the XG-GA-LightGBM model;
[0061] Step S5: Based on the model regular variables in step S3 and the decision module in step S4, perform model training of the XG-GA-LightGBM model and obtain the XG-GA-LightGBM model;
[0062] Step S6: Based on the model regular variables in step S3, extract and preprocess the regular data slices 2 hours before this moment as sample data slices;
[0063] Step S7: Input the sample data slices into the XG-GA-LightGBM model; the output value is the predicted value of the success rate of SBT at the current moment. If the output value is greater than the set threshold, it is predicted that SBT at the current moment is successful. If the output value is less than the set threshold, it is predicted that SBT at the current moment is a failure.
[0064] Specifically, in step S1, the data of SBT are screened as sample data according to the inclusion criteria and exclusion criteria of the clinical trial.
[0065] The step S2 is to obtain the model conventional data, including the following steps:
[0066] S21: arranging the data of candidate regular variables, namely candidate regular data;
[0067] S211: Summarize candidate routine variables, i.e., summarize the routine test variables before the SBT experiment;
[0068] S212: extracting corresponding data of each candidate conventional variable based on the basic database, and recording information of data acquisition timestamp of corresponding data of each candidate conventional variable;
[0069] S213: sorting the data corresponding to each candidate regular variable according to the order of collection time to generate each group of candidate regular data;
[0070] S22: Generate features, slice and annotate candidate regular data;
[0071] S221: Slice the candidate routine data; select 2 hours as the data window, and predict the probability of successful implementation of SBT according to clinical experience based on the data of each candidate routine variable within 2 hours;
[0072] S222: After the candidate regular data is sliced, it includes positive samples and negative samples. For a failed SBT experiment, the data within 2 hours before the SBT failure is intercepted as a negative sample, and the label of the negative sample is 0. For a successfully implemented SBT experiment, the data within 2 hours before the SBT success is intercepted as a positive sample, and the label of the positive sample is 1.
[0073] S223: Slice the labeled candidate regular data and divide them into a small range window of half an hour. Calculate the average, minimum, maximum, sum, and median of the divided data segments respectively, and combine them in the order of average, minimum, maximum, sum, and median to generate the actual features of the model;
[0074] S23: preprocessing the labeled candidate regular data slices;
[0075] S24: Extract the data corresponding to each conventional data variable from the preprocessed candidate conventional data slice as a feature, normalize the eigenvalues of all features, and generate a model data slice; the positive sample label in the model data slice is the same as the positive sample label in the candidate conventional data slice in S222; the negative sample label in the model data slice is the same as the negative sample label in the candidate conventional data slice in S222. Further, the routine detection variables of the medical staff of the intubated patients in the respiratory department before the SBT experiment in S211 include 24 variables, namely age, gender, marital status, heart rate, blood oxygen, blood gas, respiratory rate, respiratory status, cardiac ejection fraction, positive and negative status of the input and output, oral pressure or intrathoracic pressure for 0.1 seconds of inspiration when the air inlet is closed, RASS sedation assessment table, maximum inspiratory pressure, diaphragm thickness, diaphragm mobility, carbon dioxide partial pressure, blood oxygen saturation, pH, lung compliance, dopamine dosage, epinephrine dosage, tidal volume, flow rate, and inspired gas temperature.
[0076] In S23, the candidate regular data slices are preprocessed, which specifically includes the following steps:
[0077] S231: Eliminate candidate regular variables with missing corresponding data exceeding 90% to improve the quality of candidate regular data;
[0078] S232: The candidate regular data are normalized using the Z-Score standardization method. The normalized candidate regular data can eliminate the adverse effects on the XG-GA-LightGBM model caused by the dimension difference;
[0079] S233: Convert the non-numeric data in the candidate regular data into numeric data by using a one-hot encoding method.
[0080] In step S3, the conventional variables of the model are selected based on the XBoost model, including the following steps:
[0081] S31: Select 70% of the candidate regular data as the feature screening training set, and the remaining 30% of the data as the test set;
[0082] S32: Build a feature forgetting module based on the XGBoost model; establish the feature screening module of the XG-GA-LightGBM model by feature screening training set data samples. The objective function of feature screening is:
[0083]
[0084] Among them, loss is the loss function; Ω(f t ) is the regularization term; A is the constant term, which is the known model complexity of step t-1 before step t; is the predicted value of the new tree; y t is the sum of the fruits of the tree;
[0085] S33: Bring the features in S24 into the feature screening module respectively, calculate the marginal contribution of the features through the interpretable machine learning library, take the average of all marginal contributions of each feature, and record it as the contribution of the feature;
[0086] S34: Eliminate candidate regular variables whose contribution is less than the set threshold, and use the remaining variables as model regular variables.
[0087] In S33, the objective function L of feature screening is calculated by combining the greedy algorithm and the approximate algorithm. t In the case of a drop, iterate and loop to achieve splitting and adding branches; the iteration stops when one of the following conditions is met:
[0088] S331: When the gain after adding the branch is less than the set threshold, pre-pruning is performed;
[0089] S332: When the tree depth reaches the maximum depth of the hyperparameter max-depth;
[0090] S333: When the sum of the weights of the training set data samples is less than the number of samples in the leaf node of the hyperparameter min_child_weight.
[0091] In step S4, a decision module is established, which includes the following steps:
[0092] Step S41: For the feature set after the feature screening module, select AUC as the evaluation indicator, randomly generate multiple groups of hyperparameter settings of the LightGBM model, and initialize the population. The initialization parameters include crossover probability and mutation probability;
[0093] Step S42: define an optimization function, and the optimization function input is a hyperparameter; train the LightGBM model based on the optimization function, and calculate the AUC value as the fitness value;
[0094] Step S43: Use the roulette algorithm to implement the selection mechanism and allocate the selection probability according to the fitness value;
[0095] Step S44: randomly select two parents, exchange parameter settings at the parameter demarcation point, and perform crossover mutation operations to increase population diversity;
[0096] Step S45: perform selection and crossover mutation operations for 100 iterations; if the fitness value is greater than 0.90, terminate the algorithm; if the fitness value is less than or equal to 0.90, select the optimal fitness value;
[0097] Step S46: Select the parameters corresponding to the optimal fitness value, perform training, evaluate the performance of the improved LightGBM model on the test set in S31, and obtain the decision module.
[0098] In step S5, the model training of the XG-GA-LightGBM model is performed, including the following steps:
[0099] S51: taking 70% of the candidate regular data slices and annotations in step S2 as the model training set, and the remaining 30% of the candidate regular data slices and annotations as the validation set;
[0100] S52: The model training set calculates the optimal hyperparameters of the SBT success rate prediction model based on the LightGBM model improved by the genetic algorithm. The output of the model verification set is the success rate of SBT at the current moment. The threshold is set to 0.5. If it is greater than the set threshold, it is judged that the SBT is successfully implemented. If it is less than the set threshold, it is judged that the SBT fails. Then the optimal hyperparameters are adjusted to obtain the XG-GA-LightGBM model.
[0101] In S52, the optimal hyperparameters are adjusted based on iterative feedback.
[0102] This embodiment is a real-time prediction method for SBT success rate based on an integrated model. It provides a real-time prediction method for SBT success rate based on 108 feature variables in a feature set and a practical application process. Figure 1 The flowchart of a real-time prediction method for SBT success rate based on an integrated model is shown in FIG. , which specifically includes the following steps:
[0103] Step A1: Screen patients who have undergone SBT as samples according to the inclusion and exclusion criteria of the clinical trial, and organize the screened patient data, i.e., sample data, as the basic database; screen patients who have undergone SBT as samples from the electronic medical records database of the medical center; the inclusion criteria for the clinical trial are patients who are admitted to the hospital for the first time and intubated for the first time; the exclusion criteria are to exclude patients under the age of 18 and patients with records of changing departments during intubation;
[0104] Step A2: Use routine variables of the respiratory department as candidate routine variables; use the candidate routine variables as features, screen based on the machine learning algorithm, and then obtain the routine clinical data variables used by the real-time prediction model of SBT success rate, namely the XG-GA-LightGBM model; routine variables are variables that are easily obtained clinically;
[0105] A21: Arrange the data of candidate regular variables;
[0106] A211: Summarize candidate routine variables, i.e. summarize routine test variables of medical staff for intubated patients in the respiratory department before the SBT experiment; routine test variables of medical staff for intubated patients in the respiratory department before the SBT experiment include 24 variables, namely age, gender, marital status, heart rate, blood oxygen, blood gas, respiratory rate, respiratory status, cardiac ejection fraction, positive and negative status of input and output, oral pressure or intrathoracic pressure at 0.1 seconds of inspiration when air inlet is closed, RASS sedation assessment form, maximum inspiratory pressure, diaphragm thickness, diaphragm movement, carbon dioxide partial pressure, blood oxygen saturation, pH, lung compliance, dopamine dosage, epinephrine dosage, tidal volume, flow rate, and inspired gas temperature;
[0107] A212: extract the corresponding data of each candidate routine variable based on the information of each patient, and record the data collection timestamp information of the corresponding data of each candidate routine variable; extract the corresponding data of the candidate routine variable from the electronic medical record database of the medical center according to the sample primary key in the basic database, and divide it according to the patient's ID to obtain the information of each patient; the information of each patient includes the hospitalization information, respiratory support related information and blood gas information of each patient;
[0108] A213: sorting the data corresponding to each candidate routine variable of the patient according to the order of collection time to generate candidate routine data of each patient;
[0109] A22: Generate features, slice and annotate candidate regular data;
[0110] A221: Slice the candidate routine data; select 2 hours as the data window, and predict the probability of successful SBT implementation based on the data of each candidate routine variable of the patient within 2 hours according to clinical experience;
[0111] A222: After the candidate routine data is sliced, it includes positive samples and negative samples; for the failed SBT experiment, the data within 2 hours before the SBT failure time is intercepted as the negative sample, and the label of the negative sample is 0; for the patient who successfully implemented the SBT experiment, the data within 2 hours before the SBT success time is intercepted as the positive sample, and the label of the positive sample is 1; the 2-hour starting time = the time when the SBT is successfully implemented - the first random time period - the 2-hour time period; the data end time = the time when the SBT is successfully implemented - the second random time period; the first random time period is equal to the second random time period, which is the time period from the start time of the SBT to the time when the SBT is successfully implemented, and the first random time period and the second random time period are both recorded as t; the length of the time period is a random number in the interval (0, t) to ensure that the generated positive sample is generated during the implementation of the SBT;
[0112] A223: Slice the labeled candidate regular data into small windows of half an hour, calculate the average, minimum, maximum, sum, and median of the segmented data segments, and generate the actual features of the model in the order of average, minimum, maximum, sum, and median, and perform statistical feature calculations;
[0113] A23: Preprocessing the candidate regular data slices; Preprocessing the candidate regular data slices specifically includes the following steps:
[0114] A231: Eliminate candidate regular variables with missing corresponding data exceeding 90% to improve the quality of candidate regular data;
[0115] A232: Use Z-Score normalization to normalize candidate regular data. The normalized candidate regular data can eliminate the adverse effects on the XG-GA-LightGBM model caused by dimensional differences.
[0116] A233: Convert non-numeric data in candidate regular data into numeric data through one-hot encoding method.
[0117] A24: extract the data corresponding to each regular data variable from the preprocessed candidate regular data slice as features, normalize the feature values of all features, and generate a model data slice; the positive sample label in the model data slice is the same as the positive sample label in the candidate regular data slice in A222; the negative sample label in the model data slice is the same as the negative sample label in the candidate regular data slice in A222;
[0118] The 24 features are divided into time series features and fixed value features; the fixed value features include three feature variables, namely age, gender and marital status; the time series features include 21 feature variables, namely heart rate, blood oxygen, blood gas, respiratory rate, respiratory status, cardiac ejection fraction, positive and negative status of input and output, oral pressure or intrathoracic pressure (P0.1) at 0.1 second of inspiration when air inlet is closed, RASS sedation assessment table, maximum inspiratory pressure, diaphragm thickness (MIP), diaphragm movement, carbon dioxide partial pressure (PCO2), blood oxygen saturation (SpO2), pH (PH), lung compliance, dopamine dosage, epinephrine dosage, tidal volume, flow rate, and inspired gas temperature;
[0119] In A24, undersampling is used to balance the number of positive and negative samples in the model data slices; in the electronic medical records database of the medical center, the number of patients with successful SBT is much larger than the number of patients with failed SBT, so a small amount of patient data with successful SBT is randomly selected;
[0120] Step 3: Candidate regular variables select model regular variables based on XGBoost model;
[0121] A31: 24 test variables, i.e. candidate routine data, were used as features, and five statistical calculations of each variable in the 21 time series variables plus three feature variables, a total of 108 feature variables were divided into four groups, each containing 27 feature variables; 70% of the candidate routine data of each patient was selected as the feature screening training set, and the remaining 30% of the data was used as the test set;
[0122] A32: Building a feature forgetting module based on the XGBoost model;
[0123] A33: The feature screening module of the XG-GA-LightGBM model is established by feature screening training set data samples. The objective function of feature screening is:
[0124]
[0125] Among them, loss is the loss function; Ω(f t ) is the regularization term; A is the constant term, which is the known model complexity of step t-1 before step t, and is numerically a constant prediction constant; is the predicted value of the new tree, numerically y t is the sum of the fruits of the tree;
[0126] The objective function L of feature screening is calculated by combining greedy algorithm and approximate algorithm. t In the case of a drop, iterate and loop to split and add branches; the iteration stops when one of the following conditions is met:
[0127] A331: When the gain after adding branches is less than the set threshold, pre-pruning is performed;
[0128] A332: When the tree depth reaches the maximum depth of the hyperparameter max-depth;
[0129] A333: When the sum of the weights of the training set data samples is less than the number of samples in the leaf node of the hyperparameter min_child_weight;
[0130] A34: Bring the features in A24 into the feature screening module respectively, calculate the marginal contribution of the features through the shapleyadditive explanation (SHAP) library, take the average of all marginal contributions of each feature, and record it as the contribution of the feature;
[0131] A35: Eliminate candidate regular variables whose contribution is less than the set threshold, and use the remaining variables as model regular variables; combine the features screened out by the four groups of feature screening modules to obtain the final model regular variables:
[0132] A351: median tidal volume, minimum flow rate, sum of inspired oxygen fraction, maximum flow rate, maximum heart rate, minimum mean airway pressure, average heart rate, maximum blood oxygen saturation, minimum blood oxygen saturation, maximum respiratory rate, maximum tidal volume, average tidal volume, minimum respiratory rate, average inspired oxygen fraction, maximum mean airway pressure, average blood oxygen saturation, median flow rate, median mean airway pressure, minimum heart rate, minimum tidal volume, average respiratory rate within the period from half an hour before the end of the data to the end of the data;
[0133] A352: The minimum tidal volume, average respiratory rate, minimum heart rate, median mean airway pressure, average blood oxygen saturation, average inspired oxygen fraction, maximum respiratory rate, maximum heart rate, minimum respiratory rate, minimum blood oxygen saturation, maximum mean airway pressure, median tidal volume, minimum mean airway pressure, average tidal volume, maximum blood oxygen saturation, median heart rate, average heart rate, and sum of blood oxygen saturation from one hour before the end of the data to half an hour before the end of the data;
[0134] A353: median respiratory rate, sum of inspired oxygen fraction, average inspired oxygen fraction, maximum tidal volume, average mean airway pressure, maximum tidal volume, average mean airway pressure, minimum flow rate, minimum blood oxygen saturation, maximum blood oxygen saturation, maximum respiratory rate, minimum mean airway pressure, average heart rate, average tidal volume, minimum respiratory rate, maximum heart rate, average blood oxygen saturation, median flow rate, median mean airway pressure, minimum heart rate, minimum tidal volume, average respiratory rate;
[0135] A354: The sum of the minimum heart rate, average respiratory rate, median mean airway pressure, average blood oxygen saturation, minimum tidal volume, minimum respiratory rate, average heart rate, maximum respiratory rate, maximum heart rate, maximum blood oxygen saturation, maximum tidal volume, average inspired oxygen fraction, minimum blood oxygen saturation, maximum mean airway pressure, average tidal volume, median heart rate, median respiratory rate, and blood oxygen saturation within the period from two hours before the end of the data to one and a half hours before the end of the data;
[0136] Step A4: Improve the LightGBM model based on the genetic algorithm GA and establish a decision module in the XG-GA-LightGBM model; set the decision module, specifically including the following steps:
[0137] Step A41: Set the initial parameters of the LightGBM model and the genetic algorithm GA; the genetic algorithm GA is a heuristic search optimization algorithm that simulates the mechanisms in natural selection and genetics to find the approximate optimal solution to the problem; the LightGBM model is a fast, distributed, high-performance gradient boosting framework based on numbers, which uses a tree-based decision tree algorithm; the initial parameters include crossover probability and mutation probability;
[0138] Step A41: For the feature set after the feature screening module, select AUC as the evaluation indicator, randomly generate multiple groups of hyperparameter settings of the LightGBM model, and initialize the population. The initialization parameters include crossover probability and mutation probability;
[0139] Step A42: define an optimization function, and the optimization function input is a hyperparameter; train the LightGBM model based on the optimization function, and calculate the AUC value as the fitness value;
[0140] Step A43: Use the roulette algorithm to implement the selection mechanism and allocate the selection probability according to the fitness value;
[0141] Step A44: Randomly select two parents, exchange parameter settings at the parameter demarcation point, and perform crossover mutation operations to increase population diversity;
[0142] Step A45: perform selection and crossover mutation operations for 100 iterations; if the fitness value is greater than 0.90, terminate the algorithm; if the fitness value is less than or equal to 0.90, select the optimal fitness value;
[0143] Step A46: Select the parameters corresponding to the optimal fitness value, perform training, evaluate the performance of the improved LightGBM model on the test set in S31, and obtain the decision module.
[0144] Step A5: Take 70% of the candidate regular data slices and annotations in S222 as the model training set, and the remaining 30% of the candidate regular data slices and annotations as the verification set; train the SBT success rate prediction model based on the LightGBM model to apply to the case where the data value in the candidate regular data slice is empty. The LightGBM model only uses number-based algorithms. It is a gradient enhancement algorithm that uses multiple weak algorithms to build a stable, robust and strong algorithm; bring the model training set into the LightGBM model of step A4; output the success rate of SBT at the current moment based on the regular data 2 hours ago on the model verification set; set the threshold to 0.5, if the output value is greater than the set threshold, the prediction of SBT is successful, if the output value is less than the set threshold, the prediction of SBT is a failure; then adjust the optimal hyperparameters to obtain the model as the XG-GA-LightGBM model;
[0145] Step A7: based on the model regular variables in step A3, extract and preprocess the patient's response model regular data slices 2 hours before the moment, i.e., sample data slices;
[0146] Step A8: Input the sample data slices into the XG-GA-LightGBM model; the output value is the predicted value of the success rate of SBT at the current moment. If the output value is greater than the set threshold, it is predicted that SBT at the current moment is successful. If the output value is less than the set threshold, it is predicted that SBT at the current moment is a failure.
[0147] In view of the subjectivity and low prediction accuracy of existing SBT success rate prediction methods, the XG-GA-LightGBM integrated model algorithm is used to build an SBT success rate prediction model framework through feature forgetting module and weight training module, which overcomes the shortcomings of low accuracy of single model and solves the problem of difficult to determine valuable features in clinical practice. The real-time prediction of the patient's SBT success rate is completed, and intelligent suggestions are given to assist clinicians in deciding whether to try to evacuate mechanical ventilation, while rationally allocating medical resources.
[0148] The actual application process is to predict the success rate of the patient's SBT at the current moment, and to provide whether to recommend the implementation of SBT at the current moment to assist doctors in decision-making; it includes the following steps:
[0149] Step A: Based on the model routine variables, extract the routine data slices of the patient 2 hours before the moment as sample data slices;
[0150] Step B: preprocessing the patient's sample data slices in the same manner as the candidate conventional data slice preprocessing;
[0151] Step C: Input the data of the preprocessed sample data slice into the trained XG-GA-LightGBM model to obtain the predicted value of the success rate of SBT at the current moment; when the predicted value is greater than the set threshold, it is predicted that the patient can successfully perform SBT at the current moment; when the predicted value is less than the set threshold, it is predicted that the patient will fail to perform SBT at the current moment.
[0152] The problem of judging the success rate of SBT based on experience in the existing technology is solved, and the real-time prediction of SBT success rate is realized, so as to efficiently assist doctors in clinical decision-making and reasonably allocate medical resources. The conventional data used has higher clinical application value, and can better capture the features that are conducive to the prediction of SBT success rate for intubated patients, thereby improving the prediction accuracy. The adopted XG-GA-LightGMB model can solve the problem of missing values in the detection of different indicators of different patients, and the model has better fitness, which improves the generalization ability, stability and prediction accuracy of the model; and the AUC value of the predicted SBT success rate on the MIMIC-IV dataset is 0.8405.
[0153] The above implementation modes are not limitations of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the scope of the technical solution of the present invention also belong to the protection scope of the present invention.
Claims
1. A real-time prediction method for SBT success rate based on an integrated model. It is characterized in that The following steps are involved: Step S1: Filter the data implementing SBT as sample data, and integrate the sample data as a basic database; Step S2: using routine variables of respiratory department as candidate routine variables; Consider candidate regular variables as features; Select 2 hours as the data window to slice and annotate the routine clinical data, i.e., the candidate routine data, and use half an hour as a small range window to split the labeled candidate routine data slices. After preprocessing, the model routine data used by the SBT success rate real-time prediction model, i.e., the XG-GA-LightGBM model, is obtained; Step S3: candidate regular variables select model regular variables based on the XGBoost model; Step S4: Improve the LightGBM model based on the genetic algorithm GA and establish the decision module in the XG-GA-LightGBM model; Step S5: Based on the model regular variables in step S3 and the decision module in step S4, perform model training of the XG-GA-LightGBM model and obtain the XG-GA-LightGBM model; Step S6: Based on the model regular variables in step S3, extract and preprocess the regular data slices 2 hours before this moment as sample data slices; Step S7: Input the sample data slices into the XG-GA-LightGBM model; The output value is the predicted value of the success rate of SBT at the current moment. If the output value is greater than the set threshold, it is predicted that SBT at the current moment is successful. If the output value is less than the set threshold, it is predicted that SBT at the current moment is a failure.
2. The real-time prediction method for SBT success rate based on the integrated model according to claim 1, Features: In the step S1, the data of SBT are screened according to the inclusion criteria and exclusion criteria of the clinical trial as sample data.
3. The real-time prediction method for SBT success rate based on the integrated model according to claim 1, Features: The step S2 of obtaining the model conventional data comprises the following steps: S21: arranging the data of candidate regular variables, namely candidate regular data; S211: Summarize candidate routine variables, i.e., summarize the routine test variables before the SBT experiment; S212: extracting corresponding data of each candidate conventional variable based on the basic database, and recording information of data acquisition timestamp of corresponding data of each candidate conventional variable; S213: sorting the data corresponding to each candidate regular variable according to the order of collection time to generate each group of candidate regular data; S22: Generate features, slice and annotate candidate regular data; S221: Slice the candidate routine data; select 2 hours as the data window, and predict the probability of successful implementation of SBT according to clinical experience based on the data of each candidate routine variable within 2 hours; S222: After the candidate regular data is sliced, it includes positive samples and negative samples. For a failed SBT experiment, the data within 2 hours before the SBT failure is intercepted as a negative sample, and the label of the negative sample is 0. For a successfully implemented SBT experiment, the data within 2 hours before the SBT success is intercepted as a positive sample, and the label of the positive sample is 1. S223: Slice the labeled candidate regular data and divide them into a small range window of half an hour. Calculate the average, minimum, maximum, sum, and median of the divided data segments respectively, and combine them in the order of average, minimum, maximum, sum, and median to generate the actual features of the model; S23: preprocessing the labeled candidate regular data slices; S24: Extract the data corresponding to each regular data variable in the preprocessed candidate regular data slice as a feature, normalize the eigenvalues of all features, and generate a model data slice; the positive sample label in the model data slice is the same as the positive sample label in the candidate regular data slice in S222; the negative sample label in the model data slice is the same as the negative sample label in the candidate regular data slice in S222.
4. The real-time prediction method for SBT success rate based on the integrated model according to claim 3, Features: The detection variables in S211 before the SBT experiment include 24 variables, namely age, gender, marital status, heart rate, blood oxygen, blood gas, respiratory rate, respiratory status, cardiac ejection fraction, positive and negative status of input and output, oral pressure or intrathoracic pressure for 0.1 second of inspiration when air inlet is closed, RASS sedation level assessment table, maximum inspiratory pressure, diaphragm thickness, diaphragm mobility, carbon dioxide partial pressure, blood oxygen saturation, pH, lung compliance, dopamine dosage, epinephrine dosage, tidal volume, flow rate, and inhaled gas temperature.
5. The real-time prediction method for SBT success rate based on the integrated model according to claim 3, Features: The candidate regular data slices are preprocessed in S23, specifically including the following steps: S231: Eliminate candidate regular variables with missing corresponding data exceeding 90% to improve the quality of candidate regular data; S232: The candidate regular data are normalized using the Z-Score standardization method. The normalized candidate regular data can eliminate the adverse effects on the XG-GA-LightGBM model caused by the dimension difference; S233: Convert the non-numeric data in the candidate regular data into numeric data by using a one-hot encoding method.
6. The method for real-time prediction of SBT success rate based on an integrated model according to claim 4, Features: S31: Select 70% of the candidate regular data as the feature screening training set, and the remaining 30% of the data as the test set; S32: Building a feature forgetting module based on the XGBoost model; The feature screening module of the XG-GA-LightGBM model is established by feature screening training set data samples. The objective function of feature screening is: Among them, loss is the loss function; Ω(f t ) is the regularization term; A is the constant term, which is the known model complexity of step t-1 before step t; is the predicted value of the new tree; y t is the sum of the fruits of the tree; S33: Bring the features in S24 into the feature screening module respectively, calculate the marginal contribution of the features through the interpretable machine learning library, take the average of all marginal contributions of each feature, and record it as the contribution of the feature; S34: Eliminate candidate regular variables whose contribution is less than the set threshold, and use the remaining variables as model regular variables.
7. The real-time prediction method for SBT success rate based on the integrated model according to claim 6, Features: In S33, the objective function L of feature screening is calculated by combining the greedy algorithm and the approximate algorithm. t In the case of a drop, iterate and loop to achieve splitting and adding branches; the iteration stops when one of the following conditions is met: S331: When the gain after adding the branch is less than the set threshold, pre-pruning is performed; S332: When the tree depth reaches the maximum depth of the hyperparameter max-depth; S333: When the sum of the weights of the training set data samples is less than the number of samples in the leaf node of the hyperparameter min_child_weight.
8. The real-time prediction method for SBT success rate based on the integrated model according to claim 5, Features: The step S4 of establishing a decision module includes the following steps: Step S41: For the feature set after the feature screening module, select AUC as the evaluation indicator, randomly generate multiple groups of hyperparameter settings of the LightGBM model, and initialize the population. The initialization parameters include crossover probability and mutation probability; Step S42: define an optimization function, and the optimization function input is a hyperparameter; train the LightGBM model based on the optimization function, and calculate the AUC value as the fitness value; Step S43: Use the roulette algorithm to implement the selection mechanism and allocate the selection probability according to the fitness value; Step S44: randomly select two parents, exchange parameter settings at the parameter demarcation point, and perform crossover mutation operations to increase population diversity; Step S45: perform selection and crossover mutation operations for 100 iterations; if the fitness value is greater than 0.90, terminate the algorithm; if the fitness value is less than or equal to 0.90, select the optimal fitness value; Step S46: Select the parameters corresponding to the optimal fitness value, perform training, evaluate the performance of the improved LightGBM model on the test set in S31, and obtain the decision module.
9. The real-time prediction method for SBT success rate based on the integrated model according to claim 1, Features: The model training of the XG-GA-LightGBM model is performed in step S5, including the following steps: S51: taking 70% of the candidate regular data slices and annotations in step S2 as the model training set, and the remaining 30% of the candidate regular data slices and annotations as the validation set; S52: The model training set calculates the optimal hyperparameters of the SBT success rate prediction model based on the LightGBM model improved by the genetic algorithm. The output of the model verification set is the success rate of SBT at the current moment. The threshold is set to 0.
5. If it is greater than the set threshold, it is judged that the SBT is successfully implemented. If it is less than the set threshold, it is judged that the SBT fails. Then the optimal hyperparameters are adjusted to obtain the XG-GA-LightGBM model.
10. The method for real-time prediction of SBT success rate based on integrated model according to claim 9, Features: In S52, the optimal hyperparameters are adjusted based on iterative feedback.
