Fusion prediction method for thrombolysis treatment bleeding death risk of pulmonary embolism patient
By combining large language models and medical technology, the XGBoost model is used to analyze the EHR data of patients with pulmonary embolism, the problem of bleeding and death risk assessment in thrombolysis treatment is solved, and effective assessment and prediction of the risk of thrombolysis treatment in pulmonary embolism patients is achieved.
Patent Information
- Application Number
- CN202510244411.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-03
AI Technical Summary
Patients with pulmonary embolism have a high risk of bleeding and death in thrombolysis treatment, and the existing decision-making is difficult, and there is a lack of effective risk assessment methods.
Using a combination of large language models and the medical field, we can achieve fusion prediction of bleeding and death risks after thrombolytic treatment by collecting and pre-processing electronic health record (EHR) data of pulmonary embolism patients, using the XGBoost model for training and optimization, combining regularization strategies and grid search.
Effectively evaluate the risk of bleeding and death in patients with pulmonary embolism after thrombolysis treatment, assist doctors in making clinical treatment decisions, improve accuracy, and ensure the safety of patients' treatment.
Smart Images

Figure CN120089377A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of risk prediction for thrombolytic therapy in patients with pulmonary embolism, and specifically to a method for integrated prediction of bleeding death risk in thrombolytic therapy for patients with pulmonary embolism. Background Art
[0002] Pulmonary embolism (PE), as the third leading cause of death in humans after malignant tumors and myocardial infarction, has received great attention from researchers. However, to date, the diagnosis and treatment of PE remain very challenging problems, especially the drugs used in thrombolytic therapy can cause dangerous or fatal bleeding. But currently, there are the following problems in thrombolytic decision-making in China:
[0003] (1) It is difficult to make thrombolytic decisions. Thrombolytic therapy has strict contraindications. The absolute contraindications for thrombolytic therapy include abnormal cerebrovascular structure, intracranial malignant tumor, suspected aortic dissection, active bleeding, etc., and related contraindications include age > 75 years old, major surgery within 1 week, etc. It is undoubtedly very difficult for doctors to consider various contraindications in a short time. At the same time, there are diversities in thrombolytic drugs and thrombolytic methods. Thrombolytic drugs are mainly divided into the first-generation urokinase and streptokinase, the second-generation tissue-type plasminogen activator (t-PA), etc., and the third-generation reteplase (r-PA) and tenecteplase (TNK-tPA) according to the invention time. It is undoubtedly a huge challenge for doctors to find the most suitable drug and method according to the patient's condition in a short time.
[0004] (2) Defects in thrombolytic decisions can lead to serious side effects such as bleeding. Bleeding is the main complication of thrombolysis and may endanger the patient's life. Other side effects include nausea, vomiting, allergic reaction, fever, hypotension, etc. The probability of symptomatic cerebral hemorrhage in patients with acute ischemic stroke after thrombolysis is 6%, and its fatality rate can reach 50 - 80%. Therefore, when making thrombolytic decisions, all aspects of the patient should be considered to avoid bleeding as much as possible and improve the patient's survival rate.
[0005] Therefore, in order to solve the dilemma of low domestic thrombolytic rate and success rate to a certain extent and improve the survival rate of patients with pulmonary embolism, the present invention proposes a technical solution that combines large language models with the medical field, hoping to provide effective thrombolytic risk assessment and rapid decision-making solutions through the characteristics of large language models to automatically process a large amount of data and process and analyze data in real time. Summary of the Invention
[0006] The purpose of the present invention is to provide a method for integrated prediction of bleeding death risk in thrombolytic therapy for patients with pulmonary embolism to solve the technical problems existing in the background art.
[0007] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A method for fusing and predicting the risk of bleeding and death in thrombolytic therapy for patients with pulmonary embolism, comprising the following steps:
[0009] S1. Collect the EHR data of patients with pulmonary embolism who receive thrombolytic therapy to form a first EHR data set, where the EHR data includes medical record summaries, examination reports, test results, and medication records;
[0010] S2. Preprocess the first EHR data set, including data sorting, missing value and outlier processing, feature selection, and unifying the numerical units of indicators, to obtain a second EHR data set;
[0011] S3. According to the EHR data of each patient with pulmonary embolism collected in step S1, label the second EHR data set to mark whether each patient with pulmonary embolism has bleeding or death after receiving thrombolytic therapy, forming a third EHR data set;
[0012] S4. Randomly divide the third EHR data set into a training set and a test set at a ratio of 4:1, and perform oversampling on the training set to balance the sample distribution, obtaining the training set of the oversampled third EHR data set;
[0013] S5. Use the training set of the oversampled third EHR data set to train the XGBoost model, determine the optimal parameters of the XGBoost model through grid search, and iteratively optimize the XGBoost model by combining regularization strategies to obtain a preliminarily trained XGBoost model;
[0014] S6. Input the test set into the preliminarily trained XGBoost model, and evaluate the model performance of the preliminarily trained XGBoost model based on indicators such as accuracy, specificity, sensitivity, positive predictive value, negative predictive value, F1 score, confusion matrix, and ROC-AUC;
[0015] S7. Adjust the hyperparameters of the preliminarily trained XGBoost model according to the model performance evaluation results, and optimize the generalization ability of the preliminarily trained XGBoost model by combining supervised learning strategies to obtain an optimized XGBoost model;
[0016] S8. Input the EHR data of the target patient with pulmonary embolism into the optimized XGBoost model, and output the risk prediction results of bleeding and death after thrombolytic therapy for the target patient with pulmonary embolism.
[0017] Further, the process of data sorting is specifically as follows:
[0018] First, using the Pandas toolkit in Python, according to the identification codes of pulmonary embolism patients, obtain the corresponding demographic characteristics, medical histories, clinical manifestations, and specific results of various test items for each pulmonary embolism patient from the first EHR dataset;
[0019] Then, by checking whether the conclusions of head CT or magnetic resonance imaging of each pulmonary embolism patient in the first EHR dataset contain words such as bleeding, hematoma, or blood accumulation, identify the group of pulmonary embolism patients with intracranial hemorrhage after thrombolysis in the first EHR dataset; by checking the disease outcome records of each pulmonary embolism patient in the first EHR dataset, identify the group of pulmonary embolism patients who died after thrombolysis in the first EHR dataset;
[0020] The process of missing value and outlier handling is specifically as follows:
[0021] For features and samples in the first EHR dataset with a missing rate exceeding 10%, take deletion measures;
[0022] For data points in the physiological indicators manually recorded by doctors in the clinical manifestations in the first EHR dataset that significantly deviate from the normal range, take exclusion measures;
[0023] For high or low values in the experimental test results of various test items in the first EHR dataset, take retention measures;
[0024] The process of feature selection is specifically as follows:
[0025] First, preliminarily select features that have a relatively significant impact on the thrombolytic treatment results of pulmonary embolism patients from the first EHR dataset after data grooming, missing value, and outlier handling;
[0026] Then, conduct a statistical significance assessment on the features preliminarily selected as having a relatively significant impact on the thrombolytic treatment results of pulmonary embolism patients, and screen out features with significant differences to form the second EHR dataset.
[0027] Furthermore, the features preliminarily selected as having a relatively significant impact on the thrombolytic treatment results of pulmonary embolism patients include 15 basic information features, 10 medical history features, and 46 laboratory result features;
[0028] Among them, the 15 basic information features specifically include gender, age, smoking history, drinking history, blood transfusion history, allergy history, pregnancy history, systolic blood pressure, diastolic blood pressure, respiratory rate, body temperature, disease outcome, and bleeding; among them, gender includes two genders: male and female;
[0029] Among them, the 17 medical history features specifically include coronary heart disease, diabetes, hypertension, hyperlipidemia, cerebrovascular disease, lower extremity vascular disease, kidney disease, cancer, fracture or trauma, coagulation system disease, previous medical history, infectious disease, family aggregation disease, abortion history, chemotherapy history, targeted therapy history, and endocrine therapy history;
[0030] Among them, the 41 laboratory result features specifically include corrected calcium, alkaline phosphatase, TP*0.75, total cholesterol, albumin, chlorine, direct bilirubin, gamma-glutamyl transpeptidase, bicarbonate, globulin, potassium, TBIL*0.8, sodium, albumin / globulin ratio, calcium, total bilirubin, creatinine, urea, total protein, uric acid, basophil, monocyte, platelet count, monocyte, mean hemoglobin concentration, mean hemoglobin content, lymphocyte, eosinophil, basophil, hematocrit, hemoglobin, lymphocyte, mean RBC volume, white blood cell count, eosinophil, neutrophil, mean PLT volume, neutrophil, red blood cell count, platelet hematocrit, and PLT distribution width.
[0031] Furthermore, the specific method for statistically significant evaluation of the features initially selected as having an impact on the thrombolytic treatment outcome of pulmonary embolism patients is as follows: For the continuous features and categorical features among the features initially selected as having an impact on the thrombolytic treatment outcome of pulmonary embolism patients, variance test and Chi2 test are respectively used, and under the statistical screening criterion with a P value less than 0.05, the features with significant differences are screened out.
[0032] Furthermore, in step S3, the method for annotating the second EHR dataset is specifically as follows: According to the disease outcome record of pulmonary embolism patients, if intracranial hemorrhage occurs after thrombolytic treatment, it is labeled as a type I sample; if death occurs after thrombolytic treatment, it is labeled as a type II sample; if neither bleeding nor death occurs, it is labeled as a type 0 sample.
[0033] Furthermore, in step S4, the method for oversampling the training set to balance the sample distribution specifically uses the SMOTENC sampling method.
[0034] Furthermore, in step S5, the specific process of training the XGBoost model is as follows:
[0035] (1) Set initial hyperparameters, including learning rate, maximum tree depth, and subsample ratio;
[0036] (2) Use a regularization term to control the model complexity and iteratively optimize the loss function through gradient boosting;
[0037] (3) Use grid search to traverse parameter combinations and select the parameter combination that optimizes the cross-validation performance.
[0038] Compared with the prior art, the advantages of the present invention are as follows: It can effectively evaluate the risks of bleeding and death in patients with pulmonary embolism after thrombolytic therapy, thereby assisting doctors in making clinical treatment decisions, improving the accuracy rate, and further ensuring the treatment safety of patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following-described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0040] Figure 1 It is a flowchart of a method for fusing and predicting the risks of bleeding and death in patients with pulmonary embolism undergoing thrombolytic therapy provided by the present invention;
[0041] Figure 2 It is a schematic diagram of a confusion matrix of a preliminarily trained XGBoost model on a test set;
[0042] Figure 3 It is a feature map of the top 15 features in terms of importance for predicting the risk of bleeding during thrombolysis in patients with pulmonary embolism obtained by quantitatively analyzing the feature contributions of the features in the third EHR dataset through the SHAP interpretability method;
[0043] Figure 4 It is the top 15 features in terms of importance for predicting the risk of death during thrombolysis in patients with pulmonary embolism obtained by quantitatively analyzing the feature contributions of the features in the third EHR dataset through the SHAP interpretability method. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention.
[0045] As Figure 1 shown, the present invention provides a method for fusing and predicting the risks of bleeding and death in patients with pulmonary embolism undergoing thrombolytic therapy, which includes the following steps:
[0046] S1. Collect the EHR data of patients with pulmonary embolism undergoing thrombolytic therapy to form a first EHR dataset; wherein, the EHR data includes multiple medical documents such as medical record summaries, examination reports, test results, and medication records; for each patient with pulmonary embolism, the corresponding multiple medical documents can be indexed by a unique patient identification code patient_SN;
[0047] S2. Preprocess the first EHR dataset, including data cleaning, handling missing values and outliers, feature selection, and unifying the numerical units of metrics, to obtain the second EHR dataset;
[0048] S3. According to the EHR data of each pulmonary embolism patient collected in step S1, annotate the second EHR dataset to mark whether each pulmonary embolism patient is dead or has bleeding after thrombolytic therapy, forming the third EHR dataset;
[0049] S4. Randomly divide the third EHR dataset into a training set and a test set at a ratio of 4:1, and perform oversampling on the training set to balance the sample distribution, obtaining the training set of the oversampled third EHR dataset; Since in the actual operation process, when annotating the second EHR dataset, it is found that the number of bleeding and dead individuals is significantly less than that of non-bleeding and non-dead individuals, with a ratio of approximately 1:12.5 (bleeding) and 1:60 (death). This imbalance in data distribution may cause the model to tend to ignore those fewer bleeding samples during subsequent model training. Therefore, in order to alleviate this extreme imbalance in samples, the samples of the training set are processed for imbalance (i.e., oversampling). It should be noted here that the data after oversampling the training set is only used for model training, and the sample ratio on the test set remains unchanged;
[0050] S5. Use the training set of the oversampled third EHR dataset to train the XGBoost model, determine the optimal parameters of the XGBoost model through grid search, and iteratively optimize the XGBoost model by combining regularization strategies to obtain a preliminarily trained XGBoost model;
[0051] S6. Input the test set obtained in step S4 into the preliminarily trained XGBoost model in step S5, and evaluate the model performance of the preliminarily trained XGBoost model based on metrics such as accuracy, specificity, sensitivity, positive predictive value, negative predictive value, F1 score, confusion matrix, and ROC-AUC;
[0052] S7. Adjust the hyperparameters of the preliminarily trained XGBoost model according to the model performance evaluation results obtained in step S6, and optimize the generalization ability of the preliminarily trained XGBoost model by combining supervised learning strategies to obtain an optimized XGBoost model;
[0053] S8. Input the EHR data of the target pulmonary embolism patient into the optimized XGBoost model, and output the risk prediction results of bleeding and death after thrombolytic therapy for the target pulmonary embolism patient.
[0054] Through the above method, the risks of death and bleeding in thrombolytic therapy for any target pulmonary embolism patient can be obtained, so as to assist doctors in making corresponding decisions in clinical treatment plans, improve the accuracy rate, and further ensure the treatment safety of patients.
[0055] Specifically, as an embodiment of the present invention: in step S2 of the present invention, during the preprocessing of the first EHR dataset, the process of data sorting is specifically as follows:
[0056] First, use the Pandas toolkit in Python to obtain the demographic characteristics (such as gender, age, smoking history, drinking history, blood transfusion history, allergy history, pregnancy history, etc.), medical history (such as coronary heart disease, diabetes, hypertension, hyperlipidemia, cerebrovascular disease, lower extremity vascular disease, etc.), clinical manifestations (such as systolic blood pressure, diastolic blood pressure, respiratory rate, body temperature, etc.) and specific results of various test items (such as total cholesterol, albumin, globulin, direct bilirubin, basophils, etc.) corresponding to each pulmonary embolism patient from the first EHR dataset according to the identification code of the pulmonary embolism patient;
[0057] Then, by checking whether the conclusions of the head CT or magnetic resonance imaging (MRI) of each pulmonary embolism patient in the first EHR dataset contain words such as bleeding, hematoma or blood accumulation, identify the group of pulmonary embolism patients with intracranial hemorrhage after thrombolysis in the first EHR dataset; by checking the disease outcome records of each pulmonary embolism patient in the first EHR dataset, identify the group of pulmonary embolism patients who died after thrombolysis in the first EHR dataset.
[0058] In the actual operation process, after careful data sorting of the first EHR dataset, it is found that there are many missing items in the first EHR dataset. In order to ensure the general integrity of the data and the ideal effect of the missing value filling algorithm, corresponding processing is required. At the same time, after careful data sorting of the first EHR dataset, it is also found that there are some outliers in the first EHR dataset. These outliers may be due to instrument failures, medical staff's operation mistakes or negligence during recording, or normal changes in the patient's vital signs. In order to retain information to the greatest extent, careful handling is also required.
[0059] Specifically, as an embodiment of the present invention: in step S2 of the present invention, during the preprocessing of the first EHR dataset, the process of handling missing values and outliers is specifically as follows:
[0060] For the features and samples in the first EHR dataset with a missing rate exceeding 10%, deletion measures are taken;
[0061] For the data points in the first EHR dataset that significantly deviate from the normal range in the physiological indicators (including systolic blood pressure, diastolic blood pressure, respiratory rate, pulse, and body temperature) manually recorded by doctors in the clinical manifestations, exclusion measures are taken;
[0062] For the high or low values in the experimental test results of each test item in the first EHR dataset, retention measures are taken because for the fluctuations of high or low values in these experimental test results, it can be considered that they reflect the normal changes of the patient's vital signs to a certain extent, so retention is selected;
[0063] In the preprocessing stage of data analysis and machine learning, feature selection is a crucial step. It aims to identify and retain those features in the original dataset that have predictive value for the target variable, while removing those irrelevant or redundant features. Doing so can not only improve the performance of the model, but also reduce the computational complexity and the risk of overfitting. There are many features in the first EHR dataset collected by the present invention. Having more features does not necessarily mean more information or better information. Therefore, it is necessary to select features that are beneficial to model training through feature selection, that is, features that have a relatively large impact on the results of thrombolytic treatment for pulmonary embolism.
[0064] Specifically, as an embodiment of the present invention: in step S2 of the present invention, during the preprocessing of the first EHR dataset, the process of feature selection is as follows:
[0065] First, initially select the features from the first EHR dataset that has undergone data grooming, missing value, and outlier handling and that have a relatively large impact on the results of thrombolytic treatment for pulmonary embolism patients;
[0066] Then, conduct a statistical significance assessment on the features initially selected that have a relatively large impact on the results of thrombolytic treatment for pulmonary embolism patients, and screen out the features with significant differences to form a second EHR dataset.
[0067] Specifically, to ensure the standardization of the data, after the first EHR dataset is processed such as data grooming, missing value and outlier handling, and feature selection, it is also necessary to uniformly process the digital units under each index.
[0068] Specifically, as an embodiment of the present invention: in step S2 of the present invention, when performing feature selection, the features initially selected that have a relatively large impact on the results of thrombolytic treatment for pulmonary embolism patients include 15 basic information features, 10 medical history features, and 46 laboratory result features;
[0069] Among them, the 15 basic information features specifically include gender, age, smoking history, drinking history, blood transfusion history, allergy history, pregnancy history, systolic blood pressure, diastolic blood pressure, respiratory rate, body temperature, disease outcome, and bleeding; among them, gender includes two genders: male and female;
[0070] Among them, the 17 medical history features specifically include coronary heart disease, diabetes, hypertension, hyperlipidemia, cerebrovascular disease, lower extremity vascular disease, kidney disease, cancer, fracture or trauma, coagulation system disease, past medical history, infectious disease, family aggregation disease, abortion history, chemotherapy history, targeted therapy history, and endocrine therapy history;
[0071] Among them, the 41 laboratory result features specifically include corrected calcium (mmol / L), alkaline phosphatase (IU / L), TP * 0.75, total cholesterol (mmol / L), albumin (g / L), chloride (mmol / L), direct bilirubin (umol / L), gamma-glutamyl transpeptidase (IU / L), bicarbonate (mmol / L), globulin (g / L), potassium (mmol / L), TBIL * 0.8, sodium (mmol / L), albumin / globulin ratio, calcium (mmol / L), total bilirubin (umol / L), creatinine (umol / L), urea (mmol / L), total protein (g / L), uric acid (umol / L), basophil (%) monocyte (%), platelet count (10^9 / L), monocyte (10^9 / L), mean hemoglobin concentration (g / L), mean hemoglobin content (pg), lymphocyte (10^9 / L), eosinophil (%), basophil (10^9 / L), hematocrit (%), hemoglobin (g / L), lymphocyte (%), mean RBC volume (fL), white blood cell count (10^9 / L), eosinophil (10^9 / L), neutrophil (10^9 / L), mean PLT volume (fL), neutrophil (%), red blood cell count ( / 10^12 / L), plateletcrit (%), and PLT distribution width (fL).
[0072] Specifically, in order to evaluate the statistical significance of these initially selected features that have a relatively significant impact on the thrombolytic treatment outcome of pulmonary embolism patients, as an embodiment of the present invention: in step S2 of the present invention, the following method is specifically used to evaluate the statistical significance of the initially selected features that have a relatively significant impact on the thrombolytic treatment outcome of pulmonary embolism patients: for the continuous features and categorical features among the initially selected features that have a relatively significant impact on the thrombolytic treatment outcome of pulmonary embolism patients, variance test and Chi2 test are respectively used, and under the statistical screening criterion of P value less than 0.05, the features with significant differences are screened out. These screened features with significant differences constitute the second EHR data.
[0073] Specifically, as an embodiment of the present invention: In step S3 of the present invention, the method for annotating the second EHR dataset is specifically as follows: According to the disease outcome records of patients with pulmonary embolism, if intracranial hemorrhage occurs after thrombolytic therapy, it is annotated as a class-one sample; if the patient dies after thrombolytic therapy, it is annotated as a class-two sample; if no hemorrhage or death occurs, it is annotated as a class-zero sample.
[0074] In medical data analysis, sample imbalance (i.e., the number of one type of sample is much larger than that of another type) is a common problem. Especially in disease prediction tasks, positive samples (such as patients with a certain disease) are often much fewer than negative samples (healthy people). This imbalance can cause the model to tend to predict the majority class, thus reducing the ability to identify the minority class. Therefore, in order to ensure the accuracy of model prediction, the present invention adopts corresponding sampling techniques to address the problem of sample imbalance.
[0075] Specifically, as an embodiment of the present invention: In step S4 of the present invention, the method for oversampling the training set to balance the sample distribution specifically adopts the SMOTENC sampling method.
[0076] The following Table 1 exemplifies the experimental results of sample imbalance processing in an embodiment of the present invention:
[0077] Table 1
[0078]
[0079] As can be seen from Table 1 above, before processing, the ratio of the training set to the test set was approximately 4:1. After oversampling using the SMOTENC algorithm, the ratio of positive and negative samples in the training set became 1:1. It should be noted here that the training set data after oversampling using the SMOTENC algorithm in Table 1 above is only used for model training, and the ratio of positive and negative samples on the test set remains the original ratio.
[0080] Specifically, in step S5, the specific process of training the XGBoost model is as follows:
[0081] (1) Set initial hyperparameters, including the learning rate, maximum tree depth, and subsample ratio;
[0082] (2) Use a regularization term to control the model complexity and iteratively optimize the loss function through gradient boosting;
[0083] (3) Use grid search to traverse parameter combinations and select the parameter combination that optimizes the cross-validation performance.
[0084] The XGBoost model is the core of the implementation of the method for comprehensively predicting the risk of bleeding and death in thrombolytic therapy for patients with pulmonary embolism in the present invention. Whether the result can be accurately predicted completely depends on the performance of the XGBoost model. Therefore, the present invention takes the accuracy rate of the output result of the XGBoost model as the main detection index of the EHR model established based on the XGBoost algorithm in the present invention; the false negative rate and the false positive rate are used to measure the experimental results of the sample imbalance experiment; the confusion matrix is used to facilitate researchers to more intuitively understand the performance of the model.
[0085] The goal of the thrombolysis risk prediction task for pulmonary embolism in the present invention is to construct a binary classification model based on electronic health record (EHR) data that can effectively predict the risk of death after a patient receives thrombolytic therapy. In this prediction task, the input data is the EHR feature vectors of n patients, denoted as X = {x 1 , x 2 , … x n}, where x i ∈ R d represents the d-dimensional feature vector of the i-th patient. The output of the model is the probability of each patient's death after treatment, denoted as y i ∈ [0, 1], that is, to learn a mapping function f: R d → [0, 1], which is used to map the feature vector x i to its corresponding death probability y i .
[0086] During the model training process, the present invention adopts a supervised learning strategy and uses the test set in the second dataset with complete annotations (i.e., the test set of the third EHR dataset) to optimize the model. Specifically, in each training cycle, the system inputs the electronic health record (EHR) dataset containing real clinical labels into the XGBoost model. The XGBoost model generates the predicted values of the thrombolysis risk for pulmonary embolism through the forward calculation process, and then evaluates the deviation degree between the predicted result and the real label based on a preset loss function. Through the backpropagation algorithm, the system dynamically adjusts the model parameters to minimize the prediction error. The training process will continue until a preset termination condition is reached, including but not limited to the maximum number of iterations, the model convergence threshold, or the training duration limit, and finally a thrombolysis risk prediction model that can be used for clinical decision support is obtained.
[0087] Given the complexity of medical data and the high-precision requirements of prediction tasks, the present invention preferably uses deep learning technology to construct a prediction model. This technical solution has significant advantages: First, the deep learning model has a powerful non-linear feature extraction ability, which can effectively capture the potential associations in EHR data; Second, the end-to-end learning mechanism ensures a high degree of coordination between feature extraction and prediction tasks; Finally, this technical solution is particularly suitable for the death risk assessment of hemodynamically stable pulmonary embolism patients, providing a reliable basis for clinical decision-making.
[0088] As one of the preferred implementation schemes, the present invention proposes to use the XGBoost ensemble learning algorithm to construct a prediction model. This scheme significantly improves the generalization ability of the model through an iterative optimization process combined with regularization constraints. In terms of hyperparameter optimization, the present invention innovatively introduces the grid search algorithm, and determines the optimal hyperparameter combination through systematic exploration of the parameter space, thereby improving the model training efficiency while ensuring the prediction accuracy.
[0089] In addition, after the model is initially trained, the present invention conducts tests on the test set to test the prediction effect of the model. At the same time, eight evaluation indicators, namely accuracy, specificity, sensitivity, positive predictive value (PPV), negative predictive value (NPV), F1 score, ROC curve (Receiver Operating Characteristic Curve), and AUC (Area Under the Curve), are used to evaluate the performance of the initially trained XGBoost model. Among them, when the ratio of positive and negative samples in the test set is seriously unbalanced, a high accuracy does not necessarily mean that the model has good discrimination ability; while a high specificity means that the model can effectively identify those patient groups without bleeding risk, thus avoiding the best thrombolytic treatment opportunity for patients due to misjudgment; in addition, a relatively high positive predictive value means that the model can accurately identify patients who really need thrombolytic treatment, avoiding unnecessary thrombolytic treatment for low-risk patients (thrombolytic treatment itself has certain risks). Figure 2 Shows the confusion matrix of the initially trained XGBoost model on the test set. The darker the color of the graph, the larger the value. The darker the color on the main diagonal, the stronger the classification ability of the XGBoost model.
[0090] In addition, the present invention also uses the SHAP (SHapley Additive exPlanations) interpretability method based on game theory to quantitatively analyze the feature contribution degrees of the XGBoost model. Different from traditional global interpretation methods, SHAP assigns precise contribution values to features in each prediction sample by calculating the marginal contributions of all feature combinations. Its mathematical principle ensures the balanced distribution of feature importance and effectively avoids evaluation biases caused by feature interactions or model structures.
[0091] Figure 3 and Figure 4 Shows the top 15 features ranked by importance for predicting the risks of thrombolytic bleeding and death in patients with pulmonary embolism when quantitatively analyzing the feature contribution degrees of features in the third EHR dataset through the SHAP interpretability method.
[0092] From Figure 3 it can be seen that the most important feature in predicting the risk of thrombolytic bleeding in patients with pulmonary embolism is the surgical history, followed by age. In addition, indicators such as creatinine, history of infectious diseases, neutrophils, direct bilirubin, history of cerebrovascular diseases, history of chemotherapy, lymphocytes, etc. are also very crucial;
[0093] From Figure 4 it can be seen that the most important feature in predicting the risk of thrombolytic death in patients with pulmonary embolism is the neutrophil indicator. In addition, indicators such as eosinophils, direct bilirubin, surgical history, bicarbonate, hypertension, platelet count, respiratory rate, etc. are also very crucial.
[0094] In Figure 3 and Figure 4 each point on the graph is the SHAP value of the feature and the instance. Among them, the y-axis represents the features sorted by importance, the x-axis represents the SHAP value, and the color reflects the magnitude of the feature value. Overlapping points are jittered in the y-axis direction, and the relationship between the feature value and the prediction impact can be visually seen from the graph. For example, if a patient has undergone surgery before thrombolysis, it will increase the likelihood of bleeding, which may be because the patient stays in bed for a long time after surgery, resulting in slowed blood flow and disordered metabolism of clotting factors; the risk of bleeding also increases significantly with age; indicators such as alkaline phosphatase, creatinine, and urea are closely related to the functions of important organs throughout the body. Abnormalities in these indicators reflect disorders of organ functions, and patients with organ dysfunction are more likely to have dysfunctions in other systems, such as coagulation, electrolyte disorders, and heart failure, thus increasing the risk of bleeding; in addition, severe hypertension is also regarded as one of the relative contraindications for thrombolytic therapy because it increases the risk of bleeding.
[0095] It has been proven through practice that, for the optimized XGBoost model obtained in step S7 of the present invention, in terms of the predicted risk results obtained from predicting the risks of bleeding and death after thrombolytic therapy for any target pulmonary embolism patient, it can basically accurately predict the risks of bleeding and death of the target patient after receiving thrombolytic therapy. Specifically, through the optimized XGBoost model provided by the present invention, the normal probability after thrombolytic therapy for pulmonary embolism patients can reach 71.5%, the bleeding risk after thrombolytic therapy for pulmonary embolism patients can reach 67.4%, and the death risk after thrombolytic therapy for pulmonary embolism patients can reach 66.7%; thus, it proves the generalization ability of the fusion prediction model for the risks of bleeding and death after thrombolytic therapy for pulmonary embolism patients constructed based on the XGBoost algorithm of the present invention, which can be used in the clinical diagnosis and treatment in the field of pulmonary embolism to assist doctors in formulating reasonable treatment plans.
[0096] Finally, it should be noted that the above are only embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.
Claims
1. A fusion prediction method for the risk of bleeding and death during thrombolytic therapy in patients with pulmonary embolism, characterized in that: The following steps are included: S1. Collect EHR data of patients with pulmonary embolism who receive thrombolytic therapy to form a first EHR data set, wherein the EHR data includes medical record summaries, examination reports, test results, and medication records; S2. Preprocessing the first EHR data set, including data combing, missing value and outlier processing, feature selection and unifying indicator numerical units, to obtain a second EHR data set; S3, annotating the second EHR data set according to the EHR data of each pulmonary embolism patient collected in step S1, marking whether each pulmonary embolism patient died or had bleeding after receiving thrombolytic therapy, to form a third EHR data set; S4, randomly dividing the third EHR data set into a training set and a test set in a ratio of 4:1, and oversampling the training set to balance the sample distribution, to obtain a training set of the oversampled third EHR data set; S5. Using the training set of the oversampled third EHR data set to train the XGBoost model, determining the optimal parameters of the XGBoost model through grid search, and iteratively optimizing the XGBoost model in combination with the regularization strategy to obtain a preliminarily trained XGBoost model; S6, inputting the test set into the preliminarily trained XGBoost model, and performing model performance evaluation on the preliminarily trained XGBoost model based on accuracy, specificity, sensitivity, positive predictive value, negative predictive value, F1 score, confusion matrix and ROC-AUC index; S7. According to the model performance evaluation result, the hyperparameters of the preliminarily trained XGBoost model are adjusted, and the generalization ability of the preliminarily trained XGBoost model is optimized in combination with the supervised learning strategy to obtain an optimized XGBoost model. S8. Input the EHR data of the target pulmonary embolism patient into the optimized XGBoost model, and output the risk prediction results of bleeding and death of the target pulmonary embolism patient after thrombolytic therapy.
2. The fusion prediction method for bleeding mortality risk in thrombolytic therapy for patients with pulmonary embolism according to claim 1, characterized in that: The data combing process is as follows: First, the Pandas toolkit in Python was used to obtain the demographic characteristics, medical history, clinical manifestations, and specific results of various test items corresponding to each pulmonary embolism patient from the first EHR dataset based on the identification code of the pulmonary embolism patient; Then, by checking whether the conclusion of head CT or magnetic resonance imaging of each pulmonary embolism patient in the first EHR data set contains the words "hemorrhage", "hematoma" or "blood accumulation", the group of pulmonary embolism patients with intracranial hemorrhage after thrombolysis in the first EHR data set is identified; by checking the disease outcome record of each pulmonary embolism patient in the first EHR data set, the group of pulmonary embolism patients who died after thrombolysis in the first EHR data set is identified; The process of missing value and outlier processing is as follows: For the features and samples with a missing rate of more than 10% in the first EHR dataset, deletion measures were taken; For data points in the first EHR data set that are significantly deviated from the normal range in the physiological indicators manually recorded by the physician in clinical presentation, exclusion measures are taken; For the high or low values in the experimental test results of each test item in the first EHR data set, retention measures are taken; The feature selection process is as follows: First, the features that have a greater impact on the outcome of thrombolytic therapy in patients with pulmonary embolism were preliminarily selected from the first EHR dataset after data combing, missing value and outlier processing; Then, a statistical significance evaluation is performed on the features initially selected as having a relatively significant impact on the outcome of thrombolytic therapy for patients with pulmonary embolism, and features with significant differences are screened out to form a second EHR data set.
3. The fusion prediction method for bleeding mortality risk in patients with pulmonary embolism undergoing thrombolytic therapy according to claim 2, characterized in that: The features initially selected to have a greater impact on the outcome of thrombolytic therapy for patients with pulmonary embolism include 15 basic information features, 10 medical history features, and 46 laboratory result features; Among them, the 15 basic information characteristics specifically include gender, age, smoking history, drinking history, blood transfusion history, allergy history, pregnancy history, systolic blood pressure, diastolic blood pressure, respiratory rate, body temperature, disease progression and bleeding; among them, gender includes male and female; Among them, the 17 medical history characteristics specifically include coronary heart disease, diabetes, hypertension, hyperlipidemia, cerebrovascular disease, lower limb vascular disease, kidney disease, cancer, fracture or trauma, coagulation system disease, previous medical history, infectious disease, family clustering disease, history of miscarriage, chemotherapy history, targeted therapy history, and endocrine therapy history; Among them, the 41 laboratory result characteristics specifically include corrected calcium, alkaline phosphatase, TP*0.75, total cholesterol, albumin, chloride, direct bilirubin, gamma-glutamyl transpeptidase, bicarbonate, globulin, potassium, TBIL*0.8, sodium, white / globulin ratio, calcium, total bilirubin, creatinine, urea, total protein, uric acid, basophils, monocytes, platelet count, monocytes, mean hemoglobin concentration, mean hemoglobin content, lymphocytes, eosinophils, basophils, hematocrit, hemoglobin, lymphocytes, mean RBC volume, white blood cell count, eosinophils, neutrophils, mean PLT volume, neutrophils, red blood cell count, platelet hematocrit and PLT distribution width.
4. The fusion prediction method for bleeding mortality risk in patients with pulmonary embolism undergoing thrombolytic therapy according to claim 2, characterized in that: The specific method for conducting statistical significance evaluation on the features preliminarily selected as having a relatively influential effect on the outcome of thrombolytic therapy for patients with pulmonary embolism is as follows: variance test and Chi2 test are used for the continuous features and categorical features among the features preliminarily selected as having a relatively influential effect on the outcome of thrombolytic therapy for patients with pulmonary embolism, respectively, and features with significant differences are screened out under the statistical screening criteria of a P value less than 0.
05.
5. The fusion prediction method for bleeding mortality risk in patients with pulmonary embolism undergoing thrombolytic therapy according to claim 1, characterized in that: In step S3, the method for labeling the second EHR data set is specifically as follows: according to the disease outcome record of patients with pulmonary embolism, if intracranial hemorrhage occurs after thrombolytic therapy, it is labeled as a Class I sample; if death occurs after thrombolytic therapy, it is labeled as a Class II sample; if no bleeding or death occurs, it is labeled as a Class Zero sample.
6. The fusion prediction method for bleeding mortality risk in thrombolytic therapy for patients with pulmonary embolism according to claim 1, characterized in that: In step S4, the method of oversampling the training set to balance the sample distribution specifically adopts the SMOTENC sampling method.
7. The fusion prediction method for bleeding mortality risk in thrombolytic therapy for patients with pulmonary embolism according to claim 1, characterized in that: In step S5, the specific process of training the XGBoost model is as follows: (1) Set the initial hyperparameters, including learning rate, maximum tree depth, and subsample ratio; (2) Regularization terms are used to control model complexity and the loss function is iteratively optimized through gradient boosting; (3) Use grid search to traverse the parameter combinations and select the parameter combination that optimizes the cross-validation performance.