Patient re-admission risk prediction method based on improved CWGAN model
Through the improved CWGAN model and XGBoost model, high-quality synthetic data and interpretive prediction results are generated, the problems of unbalanced data processing and model interpretation are solved, the accuracy and interpretation of readmission risk prediction are improved, and medical care is optimized Resource allocation and personalized interventions.
Patent Information
- Application Number
- CN202411413570.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2024-12-27
AI Technical Summary
When the prior art processes uneven patient readmission data, it is difficult to effectively improve the prediction accuracy of the model, and the traditional prediction model lacks explanatory nature and cannot deeply analyze the specific reasons for readmission.
The improved CWGAN model is used to generate high-quality synthetic data, combine the XGBoost model for binary classification prediction, and interpret the model results through the SHAP algorithm to optimize medical resource allocation and decision support.
It improves the accuracy of readmission risk prediction, captures the complex relationship between readmission characteristics and labels, and generates interpretable prediction results, helping to optimize the allocation of medical resources and personalized medical interventions.
Smart Images

Figure CN119207797A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning and patient readmission risk prediction, and specifically to a patient readmission risk prediction method based on an improved CWGAN model. Background Art
[0002] In recent years, the readmission rate of various epidemic diseases has generally shown an upward trend, both at home and abroad. Readmission refers to the patient being hospitalized again for the same cause within a specified time frame after being discharged from the hospital after treatment. Reducing the readmission rate has become one of the more important goals of medical reform in many countries.
[0003] At present, there are two main types of research on readmission. One is to analyze and study the risk factors of patient readmission through statistical principles; the other is to more accurately analyze the probability of patient readmission by establishing a patient readmission risk prediction model. The construction of the readmission risk prediction model is mainly based on the patient's electronic medical record data, using a certain method to explore the relationship between the characteristics and readmission, so as to predict the possibility of the patient's subsequent readmission. However, since the readmission data has the natural imbalanced characteristics, that is, the number of patients who are readmitted and no longer hospitalized is quite different, and some traditional classification models are built on balanced data sets, therefore, how to process the imbalanced data so that it does not affect the prediction effect of the model is one of the focuses of related research. In summary, there are two main focuses in the risk prediction of readmission, one is the processing of imbalanced data, and the other is to build a prediction model.
[0004] In terms of unbalanced data processing, Chawla et al. proposed the synthetic minority oversampling technique SMOTE (Synthetic Minority Over-sampling Technique). SMOTE generates synthetic samples to increase the number of minority class samples to balance the category distribution. It mainly creates new samples by linear interpolation between minority class samples, thereby avoiding the overfitting problem caused by simply copying samples, but it does not consider the distribution of samples. Based on SMOTE, He et al. proposed the Adaptive Synthetic Sampling algorithm (ADASYN). ADASYN improved on SMOTE by adaptively generating minority class samples to improve the classifier's recognition ability for minority classes. However, the oversampling methods mentioned above are mainly based on synthesizing samples based on a subset of minority classes, without taking into account the overall distribution of the data, so the improvement of the model classification performance is relatively limited.
[0005] In terms of prediction models, readmission is a classification problem, and there are many relevant prediction models that can be used. However, many existing prediction models have shortcomings that are difficult to explain and cannot actually analyze specific results. Summary of the invention
[0006] In order to overcome the shortcomings of the existing technology, this paper proposes a patient readmission risk prediction method based on an improved CWGAN model, in order to generate more high-quality synthetic patient readmission data, solve the problem of imbalanced patient readmission data, thereby improving the accuracy of readmission risk prediction and more effectively capturing the complex relationship between patient readmission influencing features and readmission labels. At the same time, it can also optimize the allocation of medical resources, assist medical decision-making, and promote the development of intelligent medical technology.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] The method for predicting the risk of patient readmission based on the improved CWGAN model of the present invention is characterized in that it is performed according to the following steps:
[0009] Step 1: Obtain a patient readmission data set, including a patient readmission impact feature set and a patient readmission label, wherein the patient readmission impact feature set includes: a categorical column impact feature set and a numerical column impact feature set, and the patient readmission label has a value of 0 or 1, indicating whether the patient will be readmitted;
[0010] One-hot encoding is performed on the classification column influence feature set to obtain an encoded classification column influence feature set;
[0011] A variational Gaussian mixture model is used to normalize the numerical sequence influence feature set to obtain a normally distributed numerical sequence influence feature set;
[0012] The preprocessed patient readmission dataset is composed of the encoded categorical column influence feature set, the normally distributed numerical column influence feature set, and the patient readmission label, and is recorded as ,in, Indicates Readmission data for each patient, is the number of patients; and ,in, Indicates The readmission impact characteristics of each patient after pretreatment, Indicates readmission label for each patient;
[0013] Step 2: Construct an improved CWGAN model consisting of a generative network G and a discriminative network D, and Train the improved CWGAN model to obtain the optimal CWGAN model;
[0014] Step 3: The optimal CWGAN model Process and output the optimal readmission impact synthetic feature set ,in, Indicates Optimal readmission impact synthetic data for each patient;
[0015] Depend on and Composition Optimal synthetic readmission data for each patient , thus obtaining the optimal synthetic readmission dataset ;
[0016] Depend on and Composed to obtain a binary classification readmission dataset ;
[0017] Step 4: Build an XGBoost binary classification model using Train the XGBoost binary classification model to obtain the optimal XGBoost binary classification model and output the readmission prediction label ,like is 1, it means The risk of readmission is high for the patient. The risk of readmission is low for each patient.
[0018] The method for predicting the risk of patient readmission based on the improved CWGAN model described in the present invention is also characterized in that step 2 is performed as follows:
[0019] Step 2.1: Build the generative network G, including parallel The generator network has hidden layers and A generative network cross layer, and a generative network output layer;
[0020] No. The hidden layer of the generated network is a fully connected layer and uses the Leaky Relu activation function, where ;
[0021] when = 1, any random noise vector Enter the The generator network hidden layer and The corresponding output is processed in the cross layer of the generative network. The patient's Generate hidden features of readmission impact in the network and Generate a network with readmission impact cross-signal features ;
[0022] when =2,3,… When Generate hidden features of readmission impact in the network Enter the The hidden layer of the generative network is processed and the , thus by The hidden layer of the generator network outputs Generate hidden features of readmission impact in the network ;
[0023] At the same time, the Generate a network with readmission impact cross-signal features Enter the In the cross-layer of the generative network, we can get , thus by The cross-layer output of the generative network Generate a network with readmission impact cross-signal features ;
[0024] (1)
[0025] In formula (1), and They are The weight matrix and bias of the cross-layer of the generative network;
[0026] Will and After splicing, we get Generate a network to hide cross-stitching features of readmission impact , and input into the output layer of the generative network, and after being processed by gumbel_softmax function and Tanh function respectively, the corresponding The classification columns of readmitted patients affect the synthetic features and numerical columns affect synthetic features , thus forming the Synthetic features of the impact of readmission on patients ;
[0027] Step 2.2: Build the discriminant network D, including parallel The discriminative network has hidden layers and A discriminative network cross layer, and a discriminative network output layer;
[0028] No. The hidden layer of the discriminant network is a fully connected layer, and the Leaky Relu activation function is used, where ;
[0029] when =1, Enter the The discriminative network hidden layer and the The corresponding output is processed in the cross layer of the discriminant network. The patient's Discriminative network readmission impact hidden features and Discriminant network readmission impact cross-characteristics ;
[0030] when =2,3,… When Discriminative network readmission impact hidden features Enter the The discriminant network hidden layer is processed and the Discriminative network readmission impact hidden features , thus by The output of the hidden layer of the discriminative network is Discriminative network readmission impact hidden features ;
[0031] At the same time, the Discriminant network readmission impact cross-characteristics Enter the In the cross layer of the discriminant network, the first Discriminant network readmission impact cross-signal , thus by The cross-layer output of the discriminative network Discriminant network readmission impact cross-characteristics ;
[0032] (2)
[0033] In formula (2), and They are The weight matrix and bias of the cross layer of the discriminative network;
[0034] Will and After splicing, we get Discriminative network readmission impact hidden cross-joining features , and input into the discriminant network output layer, and the discriminant network D pair is obtained accordingly. Prediction value of true or false discrimination Pass The predicted value of the readmission label for readmitted patients ;
[0035] Step 2.3: Use formula (3) to establish label reconstruction loss :
[0036] (3)
[0037] In formula (3), represents the cross entropy loss;
[0038] Step 2.4: Use formula (4) to establish the loss function of the generated network G :
[0039] (4)
[0040] In formula (4), Show obedience Distribution of readmission data of The mathematical expectation of yes The weight of
[0041] Step 2.5: Use formula (5) to establish the loss function of the discriminant network D :
[0042] (5)
[0043] In formula (5), Show obedience Distribution of readmission data of The mathematical expectation of Denotes the discriminant network D The predicted value of Yes The gradient of is the weight of the gradient penalty term;
[0044] Step 2.6: Use formula (6) to construct the global objective function :
[0045] (6)
[0046] Step 2.7, based on , the improved CWGAN model is trained using the gradient descent method, and the global objective function is calculated The model parameters are updated until the discriminant network D cannot judge whether the input data is true or false, and the optimal CWGAN model is obtained.
[0047] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the patient readmission risk prediction method, and the processor is configured to execute the program stored in the memory.
[0048] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the patient readmission risk prediction method when the computer program is executed by a processor.
[0049] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0050] 1. The present invention uses an improved CWGAN model to generate patient readmission data, thereby balancing the readmission data set. Generative adversarial networks, as a popular generative model in recent years, are widely used in unsupervised learning of the distribution characteristics of original samples. As a variant of generative adversarial networks, compared with other unbalanced data processing methods, the improved CWGAN model can obtain the potential distribution law of data without supervision and generate highly realistic artificial samples, thereby obtaining a high-quality balanced patient readmission data set and improving the accuracy of patient readmission prediction.
[0051] 2. The present invention adopts the extreme gradient boosting (XGBoost) model to perform classification prediction of patient readmission data sets. Compared with statistical analysis, the model can generate a set of classification trees and assign a predicted risk score to each feature, thereby more accurately analyzing the risk probability of patient readmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0053] In this embodiment, Figure 1 As shown in FIG, a method for predicting the risk of patient readmission based on the improved CWGAN model is performed in the following steps:
[0054] Step 1. Obtain a patient readmission data set, including a patient readmission influencing feature set and a patient readmission label, wherein the patient readmission influencing feature set includes: a categorical column influencing feature set and a numerical column influencing feature set, and the patient readmission label takes a value of 0 or 1, respectively indicating whether the patient will be readmitted. In this embodiment, the selected patient readmission data set is the readmission data of rheumatoid arthritis patients. After data cleaning, a total of 1,624 readmission data of rheumatoid arthritis patients were obtained, including 18 factors affecting the readmission of rheumatoid arthritis patients, of which the categorical column influencing features include 6 columns such as gender and complications, and the numerical column influencing features include 12 columns such as age, length of hospitalization, and test indicators. The readmission label is 0 or 1, respectively indicating whether the patient will be readmitted. At the same time, among the 1,624 patient hospitalization records, a total of 75 patients were readmitted, and the readmission rate was 4.62%;
[0055] One-hot encode the classification column influence feature set to obtain the encoded classification column influence feature set;
[0056] The variational Gaussian mixture model is used to normalize the feature set of the numerical column influence to obtain the feature set of the numerical column influence with normal distribution;
[0057] The preprocessed patient readmission dataset is composed of the encoded categorical column influence feature set, the normally distributed numerical column influence feature set, and the patient readmission label, and is recorded as ,in, Indicates Readmission data for each patient, is the number of patients. In this embodiment, is 1624; and ,in, Indicates The readmission impact characteristics of each patient after pretreatment, Indicates readmission label for each patient;
[0058] Step 2: Build an improved CWGAN model consisting of a generative network G and a discriminative network D and train it to obtain the optimal CWGAN model:
[0059] Step 2.1: Build the generative network G, including parallel The generator network has hidden layers and A generative network cross layer, and a generative network output layer. In this embodiment, Take 1, where the cross layer is a neural network layer used to capture high-order interactions between features. The principle is to calculate the interactions between features through the outer product, and add the weighted sum of these interaction information to the input features, thereby capturing the relationship between high-order features.
[0060] No. The hidden layer of the generated network is a fully connected layer and uses the Leaky Relu activation function, where ;
[0061] when = 1, any random noise vector Enter the The generator network hidden layer and The corresponding output is processed in the cross layer of the generative network. The patient's Generate hidden features of readmission impact in the network and Generate a network with readmission impact cross-signal features ;
[0062] when =2,3,… When Generate hidden features of readmission impact in the network Enter the The hidden layer of the generative network is processed and the , thus by The hidden layer of the generator network outputs Generate hidden features of readmission impact in the network ;
[0063] At the same time, the Generate a network with readmission impact cross-signal features Enter the In the cross-layer of the generative network, we can get , thus by The cross-layer output of the generative network Generate a network with readmission impact cross-signal features ;
[0064] (1)
[0065] In formula (1), and They are The weight matrix and bias of the cross-layer of the generative network;
[0066] Will and After splicing, we get the generated network re-entry impact hidden cross-splicing features , and input into the output layer of the generative network, and after being processed by the gumbel_softmax function and the Tanh function respectively, the corresponding The classification columns of readmitted patients affect the synthetic features and numerical columns affect synthetic features , thus forming the Synthetic features of the impact of readmission on patients .
[0067] Step 2.2: Build the discriminant network D, including parallel The discriminative network has hidden layers and A discriminant network cross layer, and a discriminant network output layer. In this embodiment, Take 2;
[0068] No. The hidden layer of the discriminant network is a fully connected layer, and the Leaky Relu activation function is used, where ;
[0069] when =1, Enter the The discriminative network hidden layer and the The corresponding output is processed in the cross layer of the discriminant network. The patient's Discriminative network readmission impact hidden features and Discriminant network readmission impact cross-characteristics ;
[0070] when =2,3,… When Discriminative network readmission impact hidden features Enter the The discriminant network hidden layer is processed and the , thus by The output of the hidden layer of the discriminative network is Discriminative network readmission impact hidden features ;
[0071] At the same time, the Discriminant network readmission impact cross-characteristics Enter the In the cross layer of the discriminant network, we can get , thus by The cross-layer output of the discriminative network Discriminant network readmission impact cross-characteristics ;
[0072] (2)
[0073] In formula (2), and They are The weight matrix and bias of the cross layer of the discriminative network.
[0074] Will and After splicing, we get the hidden cross-splicing features of the discriminant network readmission impact , and input into the discriminant network output layer, and the discriminant network D pair is obtained accordingly. Prediction value of true or false discrimination Pass The predicted value of the readmission label for readmitted patients ;
[0075] Step 2.3: Use formula (3) to establish label reconstruction loss :
[0076] (3)
[0077] In formula (3), represents the cross entropy loss;
[0078] Step 2.4: Use formula (4) to establish the loss function of the generated network G :
[0079] (4)
[0080] In formula (4), Show obedience Distribution of readmission data of The mathematical expectation of yes The weight of
[0081] Step 2.5: Use formula (5) to establish the loss function of the discriminant network D :
[0082] (5)
[0083] In formula (5), Show obedience Distribution of readmission data of The mathematical expectation of Denotes the discriminant network D The predicted value of Yes The gradient of is the weight of the gradient penalty term.
[0084] Step 2.6: Use formula (6) to construct the global objective function :
[0085] (6)
[0086] Step 2.7, based on , use the gradient descent method to train the improved CWGAN model and calculate the global objective function The model parameters are updated until the discriminant network D cannot judge whether the input data is true or false, and the optimal CWGAN model is obtained.
[0087] Step 3: Optimal CWGAN model pair Process and output the optimal readmission impact synthetic feature set ,in, Indicates Optimal readmission impact synthetic data for each patient;
[0088] Depend on and Composition Optimal synthetic readmission data for each patient , thus obtaining the optimal synthetic readmission dataset ;
[0089] Depend on and Composed to obtain a binary classification readmission dataset .
[0090] Step 4: Build an XGBoost binary classification model using The XGBoost binary classification model is trained to obtain the optimal XGBoost binary classification model. In this embodiment, the grid search method is used to optimize the parameters of the XGBoost binary classification model. The parameter optimization results are: max_depth = 3, min_child_weight = 1, reg_alpha = 0, reg_lambda = 1, seed = 900, subsample = 0.8, colsample_bytree = 1.0, n_estimators = 200, learning_rate = 0.1, gamma = 0.1. The AUC, F1 and G-mean scores of the final model are 0.8669, 0.3750, and 0.8142, respectively. And output the readmission prediction label ,like is 1, it means The risk of readmission is high for the patient. The risk of readmission is low for each patient.
[0091] Step 5. Use the SHAP algorithm to interpret the output results of the optimal XGBoost binary classification model, that is, calculate the SHAP value of each readmission influencing feature in turn and sort them in descending order according to their absolute values. The higher the absolute value, the more important the readmission influencing feature is to the readmission prediction, thereby statistically calculating the importance ranking of J readmission influencing features. In this embodiment, J is 18, and finally the top 10 readmission influencing features are selected as the key influencing features of readmission. In this embodiment, the key influencing features of readmission of rheumatoid arthritis patients are finally obtained as follows: detection index RF, detection index ALT, detection index HGB, detection index CRP, detection index AST, detection index BUN, length of hospitalization, detection index RBC, detection index SOD, and patient age.
[0092] The present invention uses the SHAP method to further analyze the results of patient readmission risk prediction, and can obtain the impact direction of patient readmission characteristics on readmission labels and the importance ranking of patient readmission influencing characteristics, thereby providing support for clinical decision-making, facilitating the formulation of personalized medical intervention measures, and effectively reducing the probability of patient readmission.
[0093] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0094] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.
Claims
1. A patient readmission risk prediction method based on an improved CWGAN model, characterized in that: The steps are as follows: Step 1: Obtain a patient readmission data set, including a patient readmission impact feature set and a patient readmission label, wherein the patient readmission impact feature set includes: a categorical column impact feature set and a numerical column impact feature set, and the patient readmission label has a value of 0 or 1, indicating whether the patient will be readmitted; One-hot encoding is performed on the classification column influence feature set to obtain an encoded classification column influence feature set; A variational Gaussian mixture model is used to normalize the numerical sequence influence feature set to obtain a normally distributed numerical sequence influence feature set; The preprocessed patient readmission dataset is composed of the encoded categorical column influence feature set, the normally distributed numerical column influence feature set, and the patient readmission label, and is recorded as ,in, Indicates Readmission data for each patient, is the number of patients; and ,in, Indicates The readmission impact characteristics of each patient after pretreatment, Indicates readmission label for each patient; Step 2: Construct an improved CWGAN model consisting of a generative network G and a discriminative network D, and Train the improved CWGAN model to obtain the optimal CWGAN model; Step 3: The optimal CWGAN model Process and output the optimal readmission impact synthetic feature set ,in, Indicates Optimal readmission impact synthetic data for each patient; Depend on and Composition Optimal synthetic readmission data for each patient , thus obtaining the optimal readmission synthetic dataset ; Depend on and Composed to obtain a binary classification readmission dataset ; Step 4: Build an XGBoost binary classification model using Train the XGBoost binary classification model to obtain the optimal XGBoost binary classification model and output the readmission prediction label ,like is 1, it means The risk of readmission is high for the patient. The risk of readmission is low for each patient.
2. According to claim 1, a method for predicting the risk of patient readmission based on an improved CWGAN model, characterized in that: Described step 2 is carried out as follows: Step 2.1: Build the generative network G, including parallel The generator network has hidden layers and A generative network cross layer, and a generative network output layer; No. The hidden layer of the generated network is a fully connected layer and uses the Leaky Relu activation function, where ; when = 1, any random noise vector Enter the The generator network hidden layer and The corresponding output is processed in the cross layer of the generative network. The patient's Generate hidden features of readmission impact in the network and Generate a network with readmission impact cross-signal features ; when =2,3,… When Generate hidden features of readmission impact in the network Enter the The hidden layer of the generative network is processed and the , thus by The hidden layer of the generator network outputs Generate hidden features of readmission impact in the network ; At the same time, the Generate a network with readmission impact cross-signal features Enter the In the cross-layer of the generative network, we can get , thus by The cross-layer output of the generative network Generate a network with readmission impact cross-signal features ; (1) In formula (1), and They are The weight matrix and bias of the cross-layer of the generative network; Will and After splicing, we get Generate a network to hide cross-stitching features of readmission impact , and input into the output layer of the generative network, and after being processed by gumbel_softmax function and Tanh function respectively, the corresponding The classification columns of readmitted patients affect the synthetic features and numerical columns affect synthetic features , thus forming the Synthetic features of the impact of readmission on patients ; Step 2.2: Build the discriminant network D, including parallel The discriminative network has hidden layers and A discriminative network cross layer, and a discriminative network output layer; No. The hidden layer of the discriminant network is a fully connected layer, and the Leaky Relu activation function is used, where ; when =1, Enter the The discriminative network hidden layer and the The corresponding output is processed in the cross layer of the discriminant network. The patient's Discriminative network readmission impact hidden features and Discriminant network readmission impact cross-characteristics ; when =2,3,… When Discriminative network readmission impact hidden features Enter the The discriminant network hidden layer is processed and the Discriminative network readmission impact hidden features , thus by The output of the hidden layer of the discriminative network is Discriminative network readmission impact hidden features ; At the same time, the Discriminant network readmission impact cross-characteristics Enter the In the cross layer of the discriminant network, the first Discriminant network readmission impact cross-characteristics , thus by The cross-layer output of the discriminative network Discriminant network readmission impact cross-characteristics ; (2) In formula (2), and They are The weight matrix and bias of the cross layer of the discriminative network; Will and After splicing, we get Discriminative network readmission impact hidden cross-joining features , and input into the discriminant network output layer, and the discriminant network D pair is obtained accordingly. Prediction value of true or false discrimination Pass The predicted value of the readmission label for readmitted patients ; Step 2.3: Use formula (3) to establish label reconstruction loss : (3) In formula (3), represents the cross entropy loss; Step 2.4: Use formula (4) to establish the loss function of the generated network G : (4) In formula (4), Show obedience Distribution of readmission data of The mathematical expectation of yes The weight of Step 2.5: Use formula (5) to establish the loss function of the discriminant network D : (5) In formula (5), Show obedience Distribution of readmission data of The mathematical expectation of Denotes the discriminant network D The predicted value of Yes The gradient of is the weight of the gradient penalty term; Step 2.6: Use formula (6) to construct the global objective function : (6) Step 2.7, based on , the improved CWGAN model is trained using the gradient descent method, and the global objective function is calculated The model parameters are updated until the discriminant network D cannot judge whether the input data is true or false, and the optimal CWGAN model is obtained.
3. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the patient readmission risk prediction method according to claim 1 or 2, and the processor is configured to execute the program stored in the memory.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the patient readmission risk prediction method according to claim 1 or 2 are executed.
Citation Information
Patent Citations
Cardiovascular disease non-planned re-hospitalization risk prediction method
CN110347837A
Missing data filling generation method based on dual-condition generative adversarial network
CN114757335A
Relational table-oriented data generation method and device
CN118734817A
