Dynamic prediction model for infection risk of severe stroke patient
By constructing a dynamic prediction model of infection risk based on LSTM-Dropout, and using clinical experience and literature search to determine characteristic variables, the problem of insufficient accuracy of infection risk prediction in patients with severe stroke is solved, and the prediction accuracy and care quality are improved.
Patent Information
- Application Number
- CN202411106536.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2025-01-03
AI Technical Summary
The prior art is difficult to accurately predict the infection risk in patients with severe stroke, resulting in infection prolonging hospital stays, increasing medical costs and mortality.
Characteristic variables were determined through clinical experience and literature search, data normalization and missing value processing were performed, and dynamic prediction model was constructed using the LSTM algorithm combined with the Dropout method, relevant characteristic variables were selected and infection risk prediction was carried out.
It improves the accuracy of predicting infection risk in patients with severe stroke, reduces patient mortality and medical costs, and optimizes resource allocation and care quality.
Smart Images

Figure CN119252474A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to a dynamic prediction model for infection risk in severe stroke patients. Background Art
[0002] Infection is one of the most common complications in stroke patients in the ICU, mainly including pneumonia, urinary tract infection and blood infection. Especially in the intensive care unit, stroke patients have a significantly increased risk of infection due to long-term bed rest, impaired immune function and frequent need for invasive medical procedures. Infection may not only prolong the patient's hospitalization time and increase medical costs, but also aggravate the condition and increase mortality. Therefore, timely and accurate prediction of infection risk is of vital importance to improving patient prognosis, optimizing resource allocation and improving the quality of care.
[0003] Studies have shown that scientific and reasonable prediction of infection risk in severe stroke patients is of great significance to doctors in formulating treatment plans, which helps improve patients' prognosis, guide the use of antibiotics, and reduce patients' mortality. Therefore, how to establish a prediction model that can be directly applied to the infection risk of severe stroke patients has become an urgent problem to be solved in this field. Summary of the invention
[0004] The purpose of the present invention is to provide a dynamic prediction model for infection risk in patients with severe stroke, so as to address the deficiencies of the prior art and provide useful reference and guidance for the infection problem of patients with severe stroke.
[0005] The dynamic prediction model for infection risk of severe stroke patients provided by the present invention first determines characteristic variables based on clinical experience and literature retrieval and extracts data; then the data is normalized and missing values are processed; then a univariate logistic regression analysis is performed through a statistical method to screen out characteristic variables correlated with infection; finally, based on these characteristic variables, a model is constructed using an LSTM algorithm combined with a Dropout method to dynamically predict the infection risk of severe stroke patients.
[0006] The dynamic prediction model for infection risk of severe stroke patients provided by the present invention is constructed by the following specific steps:
[0007] (1) Based on clinical experience and literature retrieval, 20 characteristic variables were determined. Among them, 18 dynamic variables were: anion gap, bicarbonate, creatinine, hematocrit, hemoglobin, platelets, potassium, sodium, blood urea nitrogen, white blood cell count, heart rate, systolic blood pressure, diastolic blood pressure, mean arterial pressure, respiratory rate, body temperature, blood oxygen saturation, and blood glucose; 2 static variables were age and gender. In addition, in the design of the model, the use of antibiotics was used as a label to predict the risk of infection.
[0008] (2) Preprocessing the data, including: first, deleting data with missing values, content errors, format errors, logical errors, and data irrelevant to the study; second, organizing static characteristics (such as gender, age) and dynamic characteristics (such as vital signs, laboratory test results) into patient data sampled on a daily basis to solve the problem of uneven frequency of clinical variables on the time axis; then further verifying the relevance of the data, including, if the data is normally distributed, using the mean interpolation method for interpolation; if the data is non-normally distributed, using the median interpolation method for interpolation;
[0009] (3) Univariate logistic regression analysis was performed on the predictor variables and the incidence of infection. Based on the univariate regression results, variables with a p value less than 0.05 were selected as features for modeling;
[0010] (4) Perform sliding window processing on the preprocessed data to obtain data with the same observation window size, extract the selected features, and use the LSTM algorithm [1] Combined with Dropout method [2] Construct an LSTM-Dropout model to dynamically predict the infection risk of severe stroke patients. The LSTM-Dropout model structure is as follows: Figure 4 As shown in the figure, it includes LSTM module, ReLU function, Dropout layer, fully connected layer, and oftmax function; the specific parts are described as follows:
[0011] Model input data X T The dimension is sequence length × num_features, where sequence_length is the size of the time window and num_features is the number of features selected;
[0012] Input X T After the standard LSTM module, the hidden state h is obtained T , where the number of hidden units hidden_units is set to 50;
[0013] The last hidden state h t Processed by ReLU function to increase nonlinearity, represented as a t =ReLU(h t );
[0014] Before the fully connected layer, a Dropout layer is added for regularization, denoted as a' t = Dropout(a t ,0.3);
[0015] Activation value a' after Dropout tEnter the fully connected layer and get z = W f ·a' t +b f ;
[0016] Among them, W f and b f are the weights and biases of the fully connected layer, which has two output neurons, corresponding to whether there is an infection risk;
[0017] The output of the fully connected layer is assigned the probability of each category through the softmax function, expressed as: y = softmax(z);
[0018] Among them, y is the final output prediction of the model, indicating whether there is a risk of infection.
[0019] In addition, let batch_size be the number of data input for each training. When batch_size = 32, h t The dimension is (32,50). In training, the Adam optimizer based on adaptive moment estimation is used, and the loss function adopts the cross entropy loss function.
[0020] Compared with the prior art, the invention is innovative in that it extracts the time series data of stroke patients from admission to the ICU until discharge or death, uses statistical methods to screen features, and establishes a dynamic infection risk prediction model based on LSTM-Dropout, making full use of the time series data of stroke patients and improving the accuracy of prognosis prediction. [3] The test results on the data show that the method of the present invention has better prediction performance than the existing methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 The present invention is a flowchart of constructing a dynamic prediction model for infection risk in severe stroke patients.
[0022] Figure 2 A structural diagram for data integration.
[0023] Figure 3 A structural diagram for dividing the data of a single patient under different observation windows.
[0024] Figure 4 This is a structural diagram of the LSTM-Dropout model of the present invention.
[0025] Figure 5 Confusion matrix for infection risk prediction under different observation windows.
[0026] Figure 6 ROC curve for infection risk prediction under different observation windows. DETAILED DESCRIPTION
[0027] The modeling data comes from MIMIC-III (Medical Information Mart for Intensive Care III) (version 1.4), which contains hospitalization data of more than 50,000 patients admitted to the ICU of Beth Israel Deaconess Medical Center (BIDMC) between 2001 and 2012 and is free for research purposes. The use of the MIMIC-III database was approved by the Institutional Review Boards of BIDMC and Massachusetts Institute of Technology. The database mainly includes chart events such as demographic information, vital signs monitoring, laboratory test results, vital status, medications, image reports, and clinical outcomes. Patient inclusion criteria include: age between 18 and 89 years old; stroke is the first or second diagnosis. A total of 2939 patients were finally included in this study.
[0028] Through common clinical data indicators and literature search, 18 dynamic variables were finally included for analysis: anion gap, bicarbonate, creatinine, hematocrit, hemoglobin, platelets, potassium, sodium, blood urea nitrogen, white blood cell count, heart rate, systolic blood pressure, diastolic blood pressure, mean arterial pressure, respiratory rate, body temperature, blood oxygen saturation, blood glucose and 2 static variables: age and gender.
[0029] The quality of data can affect the performance of the model. Although the MIMIC-III database contains a lot of data, many of the data are missing or have outliers. Before using these data to build a model, data preprocessing is an essential step. The form of data stored in the database is not uniform. In the data normalization step, the main thing is to standardize the format of the data. In this study, the nominal variables were converted to binary types, the units of the same variable were unified, and the accuracy of the data was also unified.
[0030] Missing value processing: In the process of integrating data, there will be problems with missing data due to data recording reasons. This will affect the accuracy and reliability of data analysis, and most machine learning algorithms cannot directly handle situations with missing data. In this study, the processing of missing data is mainly considered from the two dimensions of samples and features. When the missing ratio of features in a certain sample exceeds 30%, the sample is directly deleted. For a single feature, features with a missing ratio of more than 30% in all samples can be deleted directly, and features with a lower missing ratio can be filled with mean, median, and mode. The present invention adopts a suitable filling method according to different feature characteristics. Specifically, for classification data such as the patient's treatment condition, the mode is used to fill; the patient's physiological indicators such as blood pressure and blood oxygen are filled with mean or median; the patient's laboratory test results are filled with mean.
[0031] Outlier processing: Outliers are defined as data points that deviate significantly from other observations in the data set. These outliers may be caused by recording errors, data noise, or real atypical observations. Processing these outliers is important for improving the accuracy and robustness of the model. For outliers that are obviously caused by recording errors or data noise, data correction is performed and the outliers are replaced with the mean or median of the data set.
[0032] In order to unify the input of the model and facilitate dynamic prediction, the static characteristics (such as gender, age) and dynamic characteristics (such as vital signs, laboratory test results) data are organized into daily sampled patient data to solve the problem of uneven frequency of clinical variables on the time axis, such as Figure 2 As shown. For static features, these features can be directly recorded as part of the daily data, keeping their original values unchanged. For dynamic features, first add an accurate timestamp to each dynamic feature value. For data missing on certain days, interpolation methods can be used to estimate these missing values. If there are multiple data points in a day, statistical methods can be used to aggregate the data points in that day to obtain representative values for each day. Finally, the preprocessed data is processed by sliding windows to provide the data required for dynamic prediction, such as Figure 3 shown.
[0033] Then, based on statistical analysis, the risk predictive variables for infection in patients with severe stroke were determined. Specifically, a univariate logistic regression analysis was performed on the predictive variables, and all variables with a p value less than 0.05 were screened out. Finally, 16 characteristic variables were screened out, including: age, anion gap, creatinine, hematocrit, hemoglobin, platelets, potassium, sodium, blood urea nitrogen, white blood cell count, heart rate, systolic blood pressure, respiratory rate, body temperature, blood oxygen saturation, and blood glucose.
[0034] Using the selected characteristic variables, we construct Figure 4 The LSTM-Dropout model shown. The number of hidden units chosen was 50, and the last hidden state of the model was then passed through a ReLU function. Before the fully connected layer, a dropout layer (with a ratio of 0.3) was used for regularization. The fully connected layer has two output neurons, and these outputs are then processed through a softmax function to assign probabilities to each class.
[0035] In the specific verification process, the data set was divided into training set, validation set and test set, with a data ratio of 7:2:1. Different observation windows were selected to predict the data of the next day, that is, the patient prognosis on day n+1 was predicted based on the data of the previous n days. A series of comprehensive evaluation methods were used to evaluate the performance of the model, including confusion matrix, accuracy, sensitivity, specificity, F1 index and area under the receiver operating characteristic (ROC) curve AUC value.
[0036] The infection risk prediction confusion matrix of this model when the time window is selected as 3, 4, and 5 days is as follows Figure 5 The ROC curve for this task is shown in Figure 6 As shown in Table 1, the AUC values are 0.86, 0.90 and 0.91 respectively. The specific quantitative results are shown in Table 1.
[0037] Table 1 Evaluation of infection risk prediction model under different observation window sizes
[0038]
[0039] It can be seen from the results that the larger the window, the better the effect. Selecting an observation window of 5 days can achieve a sensitivity of 0.80, a specificity of 0.81, and an accuracy of 0.83. The results prove the effectiveness of the model in dealing with the problem of dynamic prediction of infection risk. It can be seen that the method proposed in the present invention uses a model based on time series analysis to effectively and dynamically predict the infection risk of stroke patients and achieve good prediction results. The performance of the model was tested under different observation windows to verify the stability of the model.
[0040] References
[0041] [1]Hochreiter S,et al.Long short-term memory.Neural Computation 1997,9(8):1735-1780.
[0042] [2]Hinton GE,et al.Improving neural networks by preventing co-adaptation of feature detectors.arXiv preprint arXiv:120705802012.
[0043] [3]Johnson AE,et al.MIMIC-III,a freely accessible critical caredatabase.Scientific Data,2016,3:1-9。
Claims
1. A dynamic prediction model for infection risk in severe stroke patients, characterized in that: It is constructed by the following steps: (1) Based on clinical experience and literature retrieval, 20 characteristic variables were determined. Among them, 18 dynamic variables were: anion gap, bicarbonate, creatinine, hematocrit, hemoglobin, platelets, potassium, sodium, blood urea nitrogen, white blood cell count, heart rate, systolic blood pressure, diastolic blood pressure, mean arterial pressure, respiratory rate, body temperature, blood oxygen saturation, blood glucose, and 2 static variables were age and gender. In addition, in the design of the model, the use of antibiotics was used as a label to predict the risk of infection. (2) Preprocess the data, including: deleting data with missing values, content errors, format errors, logical errors, and data irrelevant to the study; organizing static and dynamic feature data into patient data sampled on a daily basis to solve the problem of uneven frequency of clinical variables on the time axis; and then further verifying the relevance of the data, including, if the data is normally distributed, using the mean interpolation method for interpolation; if the data is non-normally distributed, using the median interpolation method for interpolation; (3) Univariate logistic regression analysis was performed on the predictor variables and the incidence of infection. Based on the univariate regression results, variables with a p value less than 0.05 were selected as features for modeling; (4) The preprocessed data was subjected to sliding window processing to obtain data with the same observation window size, and the screened features were extracted. The LSTM algorithm was combined with the Dropout method to construct an LSTM-Dropout model to dynamically predict the infection risk of severe stroke patients.
2. The prediction model according to claim 1, characterized in that The structure of the LSTM-Dropout model includes: LSTM module, ReLU function, Dropout layer, fully connected layer, oftmax function; Assume the model input data X T The dimension is sequence length × num_feaures, where sequence_length is the size of the time window and num_feaures is the number of features filtered out; Input data X T After the LSTM module, the hidden state h is obtained T , where the number of hidden units hidden_units is set to 50; The last hidden state h t Processed by ReLU function to increase nonlinearity, represented as a t =ReLU(h t ); Before the fully connected layer, a Dropout layer is added for regularization, denoted as a' t = Dropout(a t ,0.3); Activation value a' after Dropout t Enter the fully connected layer and get z = W f ·a' t +b f ; Among them, W f and b f are the weights and biases of the fully connected layer, which has two output neurons, corresponding to whether there is an infection risk; The output of the fully connected layer is assigned the probability of each category through the softmax function, expressed as: y = softmax(z); where y is the final output prediction of the model, indicating whether there is an infection risk; During training, the Adam optimizer based on adaptive moment estimation is used, and the loss function adopts the cross entropy loss function.
