Medical event prediction method and device, equipment and storage medium
By quantifying the cost of historical patients' medical data and training interpretable medical event prediction models, combined with cost-sensitive decision trees, the problem of traditional models lacking transparency in the medical field is solved, and the interpretability and authenticity of medical event predictions are improved.
Patent Information
- Application Number
- CN202510201078.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The lack of transparency in the application of traditional machine learning models in the medical field and it is difficult to explain their decision-making process, resulting in insufficient interpretability and authenticity, limiting the effectiveness of medical event prediction.
A medical event prediction method is proposed. By post-quantitatively training on historical patients' medical data, an interpretable medical event prediction model is generated, and a cost-sensitive decision tree is used to improve the transparency and explanatory nature of the model.
It effectively improves the interpretability and authenticity of medical event predictions, making the results output from the model easier to be understood and accepted by medical professionals, thereby supporting more accurate and trustworthy clinical decisions.
Smart Images

Figure CN119724559A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a medical event prediction method, device, equipment and storage medium. Background Art
[0002] With the rapid development of artificial intelligence technology, its application in the field of healthcare is becoming more and more extensive. AI-driven algorithms can efficiently process large amounts of patient physiological data to provide support for disease prediction and diagnosis.
[0003] However, traditional machine learning models often lack transparency and have difficulty explaining their decision-making processes, which limits their widespread application in the medical field. Healthcare professionals need to be able to understand and trust the output of the model, so the development of Explainable Artificial Intelligence (XAI) technology becomes particularly important. Existing explainable machine learning methods, such as SHAP (SHapley Additive exPlanations) and PIRL (Programmatically Interpretable Reinforcement Learning), although they improve the transparency of the model, lack authenticity and explainability, that is, the generated explanations are difficult for human users to understand and accept.
[0004] Therefore, how to improve the interpretability and authenticity of medical event prediction has become a problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of this application is to provide a medical event prediction method, device, equipment and storage medium, aiming to improve the interpretability and authenticity of medical event prediction.
[0006] To achieve the above objectives, the present application proposes a medical event prediction method, wherein the method comprises: Obtain patient data corresponding to the target user and the medical events to be predicted; The patient data and the medical event to be predicted are input into an explainable medical event prediction model to obtain a medical event prediction result and an explainable decision tree output by the explainable medical event prediction model, wherein the explainable medical event prediction model is obtained by training several groups of historical patient medical data after cost quantification.
[0007] In one embodiment, the training process of the explainable medical event prediction model includes: Acquire several groups of historical patient medical data, wherein the historical patient medical data includes several medical features; For any of the historical patient medical data, quantify the cost of each of the medical features to obtain a plurality of first medical feature costs, and construct a cost-sensitive decision tree based on each of the first medical feature costs; Based on each of the cost-sensitive decision trees, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
[0008] In one embodiment, the cost quantification of each of the medical features to obtain a plurality of first medical feature costs includes: Obtaining a second medical feature cost obtained by comprehensive scoring of each of the medical features by a domain expert; and / or, Calculate the third medical feature cost corresponding to each of the medical features by a preset cost quantification method; and / or, The importance of each of the medical features is evaluated by a large language model to obtain a plurality of fourth medical feature costs; Each first medical feature cost is determined based on each second medical feature cost, each third medical feature cost and / or each fourth medical feature cost.
[0009] In one embodiment, constructing a cost-sensitive decision tree based on the costs of each of the first medical features includes: Determine an information gain calculation method corresponding to each of the first medical feature costs; Calculating the information gain corresponding to each of the medical features based on the information gain calculation methods and the first medical feature costs; Based on the information gains, a cost-sensitive decision tree is constructed.
[0010] In one embodiment, the iterative training of the initial interpretable medical event prediction model based on each of the cost-sensitive decision trees to obtain the interpretable medical event prediction model includes: Calculating the complexity corresponding to each of the cost-sensitive decision trees; Calculating each of the complexities to obtain a first regularization term, and adding the first regularization term to the objective function of the initial interpretable medical event prediction model; Based on the objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
[0011] In one embodiment, the iterative training of the initial interpretable medical event prediction model based on each of the cost-sensitive decision trees to obtain the interpretable medical event prediction model includes: Obtaining a model iteration parameter corresponding to the initial interpretable medical event prediction model and an average complexity corresponding to the cost-sensitive decision tree; Inputting the model iteration parameter and the average complexity into a decision tree prediction model to obtain a second regularization term output by the decision tree prediction model, and updating the second regularization term into the objective function of the initial interpretable medical event prediction model; Based on the updated objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
[0012] In one embodiment, after inputting the patient data and the medical event to be predicted into an interpretable medical event prediction model and obtaining the medical event prediction result and the interpretable decision tree output by the interpretable medical event prediction model, the method further includes: Pushing the medical event prediction result and the explainable decision tree to a target user for verification by the target user; Obtaining a verification result of the target user; Based on the verification results, the explainable medical event prediction model is optimized.
[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a medical event prediction device, which comprises: An acquisition module is used to acquire patient data corresponding to the target user and the medical events to be predicted; A prediction module is used to input the patient data and the medical event to be predicted into an explainable medical event prediction model to obtain the medical event prediction results and an explainable decision tree output by the explainable medical event prediction model, wherein the explainable medical event prediction model is obtained by training several groups of historical patient medical data after cost quantification.
[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a medical event prediction device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the medical event prediction method described above.
[0015] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the medical event prediction method described above are implemented.
[0016] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the medical event prediction method as described above.
[0017] The present application provides a medical event prediction method, apparatus, device and storage medium. The medical event prediction method obtains patient data corresponding to a target user and a medical event to be predicted, and then inputs the patient data and the medical event to be predicted into an interpretable medical event prediction model to obtain a medical event prediction result output by the interpretable medical event prediction model and an interpretable decision tree. The interpretable medical event prediction model is obtained by training after cost quantification of several groups of historical patient medical data, thereby quantifying the importance of medical features by referring to the interpretable medical event prediction model, taking cost factors into account while maintaining prediction accuracy, thereby effectively improving the interpretability and authenticity of medical event prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic diagram of a process flow provided for Embodiment 1 of the medical event prediction method of the present application; Figure 2 A schematic diagram of a process flow provided for Embodiment 2 of the medical event prediction method of the present application; Figure 3 A schematic diagram of a process flow provided for Embodiment 3 of the method for predicting medical events of the present application; Figure 4 A schematic diagram of a process of cost-sensitive tree regularization in an embodiment of the medical event prediction method provided in the present application; Figure 5 This is a schematic diagram of the module structure of the medical event prediction device according to an embodiment of the present application; Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the medical event prediction method in the embodiment of the present application.
[0021] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0022] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0023] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0024] In today's society, the rapid development of artificial intelligence technology has brought new changes to the field of healthcare. AI-driven algorithms can effectively process large amounts of data, and various physiological information of patients can be stored as data and handed over to AI for analysis. However, in order to fully realize its transformative impact, it is crucial to solve the problem of the lack of transparency of traditional machine learning models, which hinders their interpretability. Therefore, the necessity of explainable AI stems from the necessity to understand and verify AI decisions, ensuring that healthcare professionals can confidently understand and trust the outputs generated by the model. Therefore, the integration of explainable machine learning methods has become crucial in healthcare applications because it promotes a transparent and reliable AI-driven decision-making process. Aware of the importance of interpretability, researchers have proposed many machine learning interpretability methods, such as SHAP (SHapley Additive exPlanations) and PIRL (Programmatically Interpretable Reinforcement Learning). Although these methods improve the transparency and understandability of AI-driven decisions, they do not have authenticity and interpretability, where authenticity and interpretability refer to whether the explanations generated by machine learning algorithms are easy for human users to understand and accept.
[0025] In order to achieve authenticity and interpretability, the tree regularization algorithm was proposed. Unlike traditional L1 and L2 algorithms, the tree regularization algorithm aims to provide human-simulatable interpretability by using a decision tree structure. This method involves fitting a decision tree with data features and network outputs, and then regularizing the network using the complexity of the tree. That is, by adopting a decision tree structure that is consistent with authenticity and interpretability, tree regularization promotes the interpretability of deep models in a human-understandable way.
[0026] Although the tree regularization method improves the interpretability of deep learning models in a way that humans can understand, it also faces some challenges. First, the interpretability of tree regularization depends on its decision tree structure, and the complexity of the decision tree structure affects the effectiveness of the deep learning model in a regularized way. Tree regularization methods tend to traverse all features in the process of building decision trees, which increases the complexity of decision trees and imposes unnecessary penalties on deep learning models, thereby reducing the interpretability brought by tree regularization. In addition, the interpretation results obtained through tree graphs show that the features used by deep learning models in predictions are not always consistent with the domain knowledge or experience of human experts. For example, in a medical disease prediction scenario, doctors may find that the features used by deep learning models are inconsistent with their own clinical experience, which may cause confusion for doctors.
[0027] Therefore, improving the interpretability of tree regularization and making the features of building decision trees consistent with doctors' clinical experience have become current top priorities.
[0028] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a big data service platform, a medical event prediction system, etc. The following takes the medical event prediction system as an example to illustrate this embodiment and the following embodiments.
[0029] Based on this, the present application embodiment provides a medical event prediction method, referring to Figure 1 , Figure 1 A flowchart of the first embodiment of the medical event prediction method of the present application is provided.
[0030] In this embodiment, the medical event prediction method includes steps S11-S12: Step S11, obtaining patient data corresponding to the target user and the medical event to be predicted; It should be noted that the target user refers to the object of the model service, which can be a specific patient group, healthcare providers (such as doctors, nurses) or medical decision makers (such as hospital managers) to use the output of the model to make medical decisions or optimize patient care. In addition, the patient data refers to health-related information collected from patients, including electronic health records, laboratory test results, imaging data, lifestyle information, family medical history, and medical data (such as blood pressure, blood data, etc.).
[0031] It should be further explained that the medical events to be predicted refer to medical events that may occur in the future, such as disease diagnosis, disease recurrence, hospitalization, surgical complications, etc., such as "predicting whether the amount of bleeding of a parturient will exceed 500 ml within 2 hours and 24 hours after surgery". The goal of the model is to predict the probability or possibility of these events.
[0032] Specifically, the patient data corresponding to the target user and the medical event to be predicted are obtained. For example, a doctor can pull the patient data of the patient on the medical system to the target page and input the medical event to be predicted.
[0033] Step S12, inputting the patient data and the medical event to be predicted into an explainable medical event prediction model to obtain the medical event prediction results and an explainable decision tree output by the explainable medical event prediction model, wherein the explainable medical event prediction model is obtained by training several groups of historical patient medical data after cost quantification.
[0034] It should be noted that the explainable medical event prediction model refers to an artificial intelligence model that can not only predict medical events, but also provide explanations behind the predictions. It usually uses explainability techniques such as decision trees, SHAP values, etc., so that medical professionals can understand the decision-making process of the model.
[0035] It should be further explained that the medical event prediction results refer to the prediction results output by the artificial intelligence model, including the probability of event occurrence, risk score or classification label (such as normal / abnormal), etc., which are used to guide clinical decision-making and patient management. The interpretable decision tree refers to a decision tree model that not only provides prediction results, but also shows the decision path leading to these results, which helps medical professionals understand how the model uses patient data to make predictions.
[0036] Furthermore, the historical patient medical data refers to medical data of past patients, which is used to train artificial intelligence models, so that by analyzing historical data, the model can learn patterns and associations to predict future medical events.
[0037] Specifically, the patient data and the medical event to be predicted are input into an explainable medical event prediction model to obtain the medical event prediction results and an explainable decision tree output by the explainable medical event prediction model, so that the results output by the model can be used as auxiliary data decision-making basis for target users to make clinical decisions, that is, to provide target users with additional information support to help them make more informed clinical decisions.
[0038] In one embodiment, a doctor collects patient data of a parturient in a clinical environment and inputs it into the system. The patient data includes: the age of the parturient (e.g., 30 years old); the weight of the parturient (e.g., 70 kg); the blood pressure of the parturient (e.g., 120 / 80 mmHg); the amount of amniotic fluid (e.g., normal or abnormal); and the mode of fetal delivery (e.g., vaginal delivery or cesarean section). The patient data is then input into a neural network model (i.e., an interpretable medical event prediction model) that has been regularized by CSTR, so that the model can quickly give a prediction result based on the trained decision tree and neural network structure. For example, the medical event prediction result is that the model predicts that the parturient has a higher risk of postpartum hemorrhage (PPH=1). The interpretable decision tree generated by the model is as follows: Main splitting features: The model first splits based on "fetal delivery method" because this feature has high information gain and low cost; if it is a cesarean section, the model further checks "maternal blood pressure"; if it is a natural birth, the model further checks "maternal weight".
[0039] Specific path: For this parturient (cesarean section, blood pressure 120 / 80 mmHg), the decision path of the model is: fetal delivery mode = cesarean section → blood pressure = normal range → predicted high risk of PPH.
[0040] Furthermore, doctors make decisions based on the model's predictions and explanatory outputs combined with their own clinical experience. For example, doctors decide to closely monitor the mother's bleeding after delivery and prepare necessary preventive measures in advance (such as blood transfusion equipment, drugs, etc.). If the mother does experience postpartum hemorrhage, the doctor can record this result and feedback it to the data scientist for further optimization of the model; if the mother does not experience postpartum hemorrhage, the doctor can also record this situation to help evaluate the accuracy of the model.
[0041] This embodiment obtains patient data corresponding to the target user and the medical event to be predicted, and then inputs the patient data and the medical event to be predicted into an explainable medical event prediction model to obtain the medical event prediction results and an explainable decision tree output by the explainable medical event prediction model, wherein the explainable medical event prediction model is obtained by training after cost quantification of several groups of historical patient medical data, thereby quantifying the importance of medical features by referring to the explainable medical event prediction model, taking cost factors into account while maintaining prediction accuracy, thereby effectively improving the interpretability and authenticity of medical event prediction and realizing personalized medicine.
[0042] Based on this, the present application embodiment provides a medical event prediction method, referring to Figure 2 , Figure 2 A flow chart of the second embodiment of the medical event prediction method of the present application.
[0043] In a feasible implementation, the training process of the explainable medical event prediction model includes: Step S21, obtaining several groups of historical patient medical data, wherein the historical patient medical data includes several medical features; It should be noted that the medical characteristics refer to quantifiable attributes or variables used to describe the patient's health status, including but not limited to: demographic information (such as age, gender, etc.), physiological measurements (such as blood pressure, blood sugar level, heart rate), laboratory test results (such as blood tests, biochemical indicators), medical history (such as previous illness, surgical history, drug allergies), lifestyle factors (such as smoking, drinking, exercise habits), family medical history, etc.
[0044] Specifically, several groups of historical patient medical data can be obtained through the patient database in the hospital, which is not limited here and can be set according to actual conditions.
[0045] Step S22, for any of the historical patient medical data, quantify the cost of each of the medical features to obtain a plurality of first medical feature costs, and construct a cost-sensitive decision tree based on each of the first medical feature costs; It should be noted that the first medical feature cost refers to the resources and costs required to obtain, process and use each medical feature, including: data collection costs (such as patient visits, testing fees), data processing costs (such as data cleaning, feature engineering), computing costs (such as model training, predictive calculations), time costs (such as waiting for test results, model training time) and opportunity costs (such as selecting a certain feature and ignoring other potentially important features), etc.
[0046] It should be further explained that the cost-sensitive decision tree (CSTR, Cost-Sensitive Tree Regularization) refers to a decision tree algorithm that considers feature costs when constructing a decision tree. This algorithm not only considers criteria such as information gain when splitting nodes, but also weighs the cost of features and gives priority to splitting the most cost-effective features, thereby minimizing the overall cost of the model while maintaining prediction accuracy.
[0047] Specifically, for any of the historical patient medical data, the second medical feature cost is obtained after the field experts comprehensively score each of the medical features; and / or, the third medical feature cost corresponding to each of the medical features is calculated by a preset cost quantification method; and / or, the importance of each of the medical features is evaluated by a large language model to obtain several fourth medical feature costs, and then the first medical feature cost is determined based on each of the second medical feature costs, each of the third medical feature costs and / or each of the fourth medical feature costs.
[0048] Furthermore, the information gain calculation method corresponding to each of the first medical feature costs is determined, and then based on each of the information gain calculation methods and each of the first medical feature costs, the information gain corresponding to each of the medical features is calculated, so as to construct a cost-sensitive decision tree based on each of the information gains.
[0049] Step S23, based on each of the cost-sensitive decision trees, iteratively train the initial explainable medical event prediction model to obtain the explainable medical event prediction model.
[0050] It should be noted that the initial interpretable medical event prediction model refers to an interpretable medical event prediction model constructed based on the initial data set and features before the iterative training process begins, which uses some basic interpretability techniques (such as decision trees, linear models, etc.), but has not yet undergone cost-sensitive optimization or iterative improvement.
[0051] Specifically, the complexity corresponding to each of the cost-sensitive decision trees is calculated, and then each of the complexities is calculated to obtain a first regularization term, and the first regularization term is added to the objective function of the initial interpretable medical event prediction model, so that based on the objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
[0052] This embodiment obtains several groups of historical patient medical data, wherein the historical patient medical data includes several medical features, and then for any of the historical patient medical data, the cost of each medical feature is quantified to obtain several first medical feature costs, and based on each of the first medical feature costs, a cost-sensitive decision tree is constructed, and then based on each of the cost-sensitive decision trees, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model, and then by constructing a cost-sensitive decision tree, the decision-making process of the model becomes more transparent, and medical professionals can more easily understand how the model makes predictions, thereby effectively improving the interpretability of the model, and helping to identify which features are most valuable for prediction and which features may increase unnecessary costs, thereby guiding the feature selection process, improving the prediction efficiency and accuracy of the model, and reducing the complexity of the model, reducing the risk of overfitting, thereby improving the interpretability of the tree regularization and making the features of the decision tree consistent with the clinical experience of doctors. In addition, the cost-sensitive method can help medical institutions allocate resources more effectively, for example, by giving priority to collecting and analyzing the most cost-effective feature data.
[0053] In a feasible implementation manner, the cost quantification of each of the medical features to obtain a plurality of first medical feature costs includes: Step S31, obtaining a second medical feature cost obtained by a field expert after comprehensively scoring each of the medical features; and / or, It should be noted that the second medical feature cost refers to the cost assessment obtained by comprehensive scoring of various medical features by domain experts. The domain experts may include doctors, medical researchers or other healthcare professionals, who score the clinical value, acquisition difficulty and cost-effectiveness of the features based on their professional knowledge and experience.
[0054] Specifically, a comprehensive score of each of the medical features is obtained from a domain expert, and each of the comprehensive scores is used as the cost of each second medical feature.
[0055] Step S32, calculating the third medical feature cost corresponding to each of the medical features by a preset cost quantification method; and / or, It should be noted that the preset cost quantification method is used to calculate the cost of each medical feature to quantify the cost of acquiring, processing and analyzing the feature, such as the SHAP (SHapley Additive exPlanations) method. The third medical feature cost refers to the cost of each medical feature calculated by the preset cost quantification method, such as the Shapley value calculated by the SHAP method.
[0056] Specifically, the third medical feature cost corresponding to each of the medical features is calculated by a preset cost quantification method. In one embodiment, the Shapley value corresponding to each of the medical features is calculated by the SHAP method, and each of the Shapley values is used as the third medical feature cost corresponding to each of the medical features.
[0057] Step S33, evaluating the importance of each of the medical features through a large language model to obtain a plurality of fourth medical feature costs; It should be noted that the large language model (LLM) refers to a large natural language processing (NLP) model, such as BERT, GPT, etc., which are trained with a large amount of text data and can understand and generate natural language. In the medical field, large language models can be used to analyze medical literature, case reports and other text data to evaluate the importance of medical features. The fourth medical feature cost refers to the cost obtained after evaluating the importance of each medical feature through a large language model.
[0058] Specifically, the importance of each of the medical features is evaluated through the large language model to obtain several fourth medical feature costs. For example, each of the medical features is input into the large language model so that the large language model evaluates the feature importance based on factors such as the frequency of mention of the medical feature in medical literature, the correlation with other features, and the impact on disease diagnosis and treatment, to obtain the fourth medical feature cost.
[0059] Step S34, determining each first medical feature cost based on each second medical feature cost, each third medical feature cost and / or each fourth medical feature cost.
[0060] It should be noted that the original tree regularization method is a regularization method similar to traditional L1 and L2 regularization, which uses data samples and the output of the neural network to be regularized to fit and generate a decision tree. Then, by calculating the complexity of the decision tree, a regularization term is obtained, which is then added to the objective function of the neural network to achieve the regularization of the neural network. At the same time, the depth of the tree and the number of nodes can be used to calculate the complexity of the decision tree, which can then be used to measure the transparency of complex models, thereby achieving the purpose of measuring the interpretability of different models. Although the original tree regularization solves the problem of simulatable interpretability of deep models, it still has some challenges. First, the explanation provided by tree regularization through tree structure graphs may not always be accepted by experts, and the above problem can be effectively solved by quantifying the importance of features.
[0061] Specifically, based on each of the second medical feature costs, each of the third medical feature costs and / or each of the fourth medical feature costs, the cost of each first medical feature is determined, that is, the method of quantifying the importance of features can be achieved by combining expert knowledge, for example, asking experts such as doctors to score features. When scoring is challenging or expert knowledge is unavailable, the SHAP method can be used to calculate the Shapley value or a large language model can be used to score features to help quantify feature importance and determine the first medical feature cost corresponding to each of the medical features, so as to select features by combining multiple feature costs, that is, adding cost-sensitive operations to the original tree regularization framework (that is, providing three cost selectable methods) so that the decision tree can penalize the deep network according to the importance of the features, and then compared with the original decision tree, a simpler and easier to explain structure is achieved for the cost-sensitive decision tree, thereby enhancing the interpretability of the original tree regularization, giving priority to important features in the process of constructing the decision tree, solving the problem that the features used by the original tree regularization when constructing the decision tree are inconsistent with the expectations of experts, and catering to users with different backgrounds and needs.
[0062] In this embodiment, the second medical feature cost is obtained after the domain experts comprehensively score the medical features; and / or, the third medical feature cost corresponding to each medical feature is calculated by a preset cost quantification method; and / or, the importance of each medical feature is evaluated by a large language model to obtain several fourth medical feature costs, and then the cost of each first medical feature is determined based on the second medical feature cost, the third medical feature cost and / or the fourth medical feature cost. By combining the domain expert scoring, the preset cost quantification method and the large language model evaluation, the importance and cost of the medical features can be evaluated from different angles, the comprehensiveness and accuracy of the evaluation can be improved, and the cost and importance of different features can be clarified to better explain the decision-making process of the model, while helping medical institutions to allocate resources more effectively, give priority to collecting and analyzing the most cost-effective feature data, improve resource utilization efficiency, and finally comprehensively evaluate the cost and importance of different features, thereby guiding the feature selection process, removing redundant or low-value features, retaining the most valuable features, and thus improving the efficiency and accuracy of the model. At the same time, the interpretability of the tree regularization method is improved and expert knowledge is incorporated into the construction process of the decision tree so that the features of the decision tree are consistent with the doctor's experience.
[0063] Based on this, the present application embodiment provides a medical event prediction method, referring to Figure 3 , Figure 3 A flowchart diagram of the third embodiment of the medical event prediction method of the present application is provided.
[0064] In a feasible implementation, constructing a cost-sensitive decision tree based on the costs of each of the first medical features includes: Step S41, determining the information gain calculation method corresponding to each of the first medical feature costs; It should be noted that although the original tree regularization solves the problem of simulatable interpretability of deep models, it still has some challenges. First, the explanation provided by tree regularization through tree structure diagrams may not always be accepted by experts; second, the interpretability of tree regularization depends on its decision tree structure, which also affects the impact of regularization on deep models. The original tree regularization uses the CART (Classification and Regression Trees) algorithm to build a decision tree, resulting in an extended tree structure that traverses all features and imposes significant penalties on deep models. The first problem can be effectively solved by quantifying the importance of features.
[0065] It is further noted that the second issue is related to the decision tree structure and can be mitigated by prioritizing the traversal of features based on their importance. Cost-sensitive decision trees were originally designed for scenarios where feature cost is critical, and these decision trees prioritize the construction process by favoring low-cost features. For example, in the context of disease prediction, features such as a patient's height, weight, and blood test results may have different costs. By ensuring accurate predictions, cost-sensitive decision trees will choose lower-cost features such as height (height only requires simple operations from the patient to obtain data, and the cost is lower compared to blood tests) to build the decision tree, thereby taking cost factors into account while maintaining prediction accuracy.
[0066] Furthermore, the information gain calculation method refers to a technique for evaluating the contribution of a feature to a classification result, which is achieved by calculating the degree to which the uncertainty (or impurity) of a data set is reduced after data segmentation on a certain feature.
[0067] Specifically, determine the information gain calculation method corresponding to each of the first medical feature costs. In one embodiment, if the first medical feature cost is determined by the second medical feature cost, the information gain calculation method corresponding to the first medical feature cost is the information gain calculation method corresponding to expert knowledge; if the first medical feature cost is determined by the third medical feature cost, the information gain calculation method corresponding to the first medical feature cost is the information gain calculation method corresponding to the preset cost quantification method, such as the SHAP method; if the first medical feature cost is determined by the fourth medical feature cost, the information gain calculation method corresponding to the first medical feature cost is the information gain calculation method corresponding to the large language model.
[0068] Step S42, calculating the information gain corresponding to each of the medical features based on each of the information gain calculation methods and each of the first medical feature costs; It should be noted that the information gain refers to the degree to which the uncertainty (or impurity) of the data set is reduced by splitting the data on a certain feature during the decision tree construction process. It is an indicator to measure the contribution of the feature to the classification result and is used to select the optimal split feature. The larger the information gain, the greater the contribution of the feature to the classification result, and the more suitable it is as a split feature of the decision tree.
[0069] Specifically, based on each of the information gain calculation methods and each of the first medical feature costs, the information gain corresponding to each of the medical features is calculated, wherein the basic calculation formula for the information gain in the original regular tree includes:
[0070] in, The entropy of the dataset D is an indicator of the purity of the dataset, which is used to describe the uncertainty or confusion of the dataset. The dataset D consists of y samples, p k Represents the proportion of samples of the kth class in the dataset D. The following formula shows the calculation of information gain in the original regular tree:
[0071] in, Usually refers to the information gain in the original regular tree, which is a metric used to select the best segmentation feature in decision tree algorithms (such as ID3 algorithm). v Represents a sample set of features with V values.
[0072] Further, in one embodiment, if the information gain corresponding to the medical feature is calculated according to the information gain calculation method corresponding to the expert knowledge and the first medical feature cost, then based on the above two formulas, the information gain is calculated as follows:
[0073] in, It refers to an information gain metric that takes into account feature cost. It is used when building a cost-sensitive decision tree. In a cost-sensitive decision tree, not only the information gain of the feature but also the cost of the feature should be considered. Represents the expert cost of medical feature a.
[0074] Additionally, in order to use Shapley values as costs, the network is first trained with patient data, and the cost of each feature is initialized to 1 (no cost-sensitive operation is performed), and then in each round of training, the Shapley value of the feature is calculated using the SHAP method. In the process of constructing a decision tree, these Shapley values are added as costs, thereby obtaining a Shapley value-sensitive decision tree. In another embodiment, if the information gain corresponding to the medical feature is calculated according to the information gain calculation method corresponding to the preset cost quantification method and the first medical feature cost, then based on the above formula, the information gain is calculated as follows:
[0075] in, It refers to using Shapley value to evaluate the information gain of medical feature a to data set D. It refers to the Shapley value of medical feature a.
[0076] Step S43: construct a cost-sensitive decision tree based on each of the information gains.
[0077] Specifically, the ID3 algorithm is used to construct a cost-sensitive decision tree. This algorithm differs from CART in the metric of data partitioning. Since ID3 uses information gain as its criterion, which is related to the importance of the feature, a higher information gain indicates that the "purity" of the data set achieved by partitioning the selected features has been greatly improved. Therefore, by adding cost-sensitive operations to the original tree regularization framework, the decision tree can penalize the deep network according to the importance of the features, thereby enhancing the interpretability of the original tree regularization and making the features of constructing the decision tree consistent with the clinical experience of doctors.
[0078] This embodiment determines the information gain calculation method corresponding to the cost of each of the first medical features, and then calculates the information gain corresponding to each of the medical features based on the information gain calculation method and the cost of each of the first medical features, thereby constructing a cost-sensitive decision tree based on the information gain. By considering the cost and information gain of the features, the most valuable features for model prediction can be more effectively selected, while avoiding the selection of high-cost and low-efficiency features, thereby constructing a simpler and more efficient model and improving the prediction accuracy of the model. At the same time, by excluding features with high cost and low information gain, the complexity of the decision tree is reduced, the risk of overfitting is reduced, and the generalization ability of the model is improved, and the interpretability of the model is enhanced.
[0079] In a feasible implementation, the iterative training of the initial interpretable medical event prediction model based on each of the cost-sensitive decision trees to obtain the interpretable medical event prediction model includes: Step S51, calculating the complexity corresponding to each of the cost-sensitive decision trees; It should be noted that the complexity refers to the cost-sensitive decision tree model. The complexity may involve the depth (number of layers), number of nodes, number of branches, etc. of the tree, which is not limited here.
[0080] Specifically, the complexity corresponding to each of the cost-sensitive decision trees is calculated according to a preset complexity calculation formula, which is not limited here.
[0081] Step S52, calculating each of the complexities to obtain a first regularization term, and adding the first regularization term to the objective function of the initial interpretable medical event prediction model; It should be noted that the first regularization term refers to the first regularization term added to the objective function during the model training process, which is used to control the complexity of the model and prevent overfitting. It is calculated based on the complexity of the decision tree, such as the depth or number of nodes of the tree. In addition, the first regularization term can remain unchanged for a certain number of iterations, or it can be updated after the model is iterated once, that is, the regularization term is updated through the decision tree prediction model, thereby realizing parameter adjustment of the model's real-time iterative training to improve the accuracy of the model.
[0082] It should be further explained that the objective function refers to the core of optimization in the training process of the machine learning model, which defines the performance standard of the model. The objective function includes not only the loss function, but also one or more regularization terms, where the role of the regularization term is to penalize the complexity of the model and encourage the model to learn smoother and more generalized features.
[0083] Specifically, each of the complexities is calculated to obtain a first regularization term, and the first regularization term is added to the objective function of the initial interpretable medical event prediction model. There is no limitation here and it can be set according to actual conditions.
[0084] Step S53, based on the objective function, iteratively train the initial explainable medical event prediction model to obtain the explainable medical event prediction model.
[0085] Specifically, according to the historical patient data set and the objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the predicted value output by the initial interpretable medical event prediction model, and then based on the predicted value and the real medical event, the model loss value is calculated using the objective function containing the first regularization term. In this embodiment, the objective function can be set according to actual needs and is not specifically limited here. After the model loss value is calculated, the training process ends, and the error back propagation algorithm and the decision tree prediction model are used to update the model parameters in the initial interpretable medical event prediction model, and then the next training is carried out. During the training process, it is determined whether the updated initial interpretable medical event prediction model meets the preset training end conditions. If it does, the updated initial interpretable medical event prediction model is used as the interpretable medical event prediction model. If it does not, the model training continues, wherein the preset training end conditions include loss convergence and reaching the maximum number of iterations threshold.
[0086] In one embodiment, the above method is evaluated in the task of predicting postpartum hemorrhage in pregnant women using a private dataset of Hospital A, which includes 7674 samples collected from 2018 to 2021, including 409 positive samples (PPH=1) and 7265 negative samples (PPH=0). The outcome event of this task is to predict whether the amount of bleeding of the parturient exceeds 500ml within 2 hours and 24 hours after surgery, where the positive sample event is recorded as "PPH=1", indicating that postpartum hemorrhage has occurred, and the negative sample event is recorded as "PPH=0", indicating that postpartum hemorrhage has not occurred. In view of the serious imbalance in the PPH dataset, a subset dataset containing 994 samples is created, which contains 492 positive samples and 501 negative samples, including 30 medical features such as amniotic fluid volume, cervical condition, and frequency of vaginal examination.
[0087] Furthermore, the cost-sensitive tree regularization method proposed in this application was compared with the traditional L1 and L2 regularization methods. The evaluation method used a deep neural network (i.e., an explainable medical event prediction model) as the main evaluation model, and used the ROC (Receiver Operating Characteristic) curve area under the curve AUC (Area Under the Curve), F1 score, and accuracy ACC (Accuracy) for evaluation. In terms of cost selection, we combined expert knowledge (CSTR-EK), Shapley value (CSTR-SV), and large language model LLM (CSTR-LLM) scores, as shown in Table 1, where TR is Tree regularization. It is worth noting that the medical features used by the expert knowledge cost-sensitive decision tree ranked higher in the annotations provided by doctors: the birth time feature ranked third, the fetal delivery method feature ranked eighth, and the postpartum contraction ranked ninth.
[0088] Table 1
[0089] Although using expert knowledge as cost leads to a slight decrease in prediction performance (the AUC value is 84.11%, which is lower than other methods), after discussing with hospital clinicians, the explanation tree generated by the model built by introducing doctor knowledge as cost is more consistent with clinical cognition. The reason for the decline in prediction performance may be related to the construction of expert cost. The expert cost calculation method used in the experiment is relatively simple, and only combines expert scores to obtain the importance and difficulty of the feature. In practical applications, feature costs should be calculated comprehensively through a variety of methods such as expert knowledge, historical data analysis, and market research.
[0090] This embodiment calculates the complexity corresponding to each of the cost-sensitive decision trees, and then calculates each of the complexities to obtain a first regularization term, and adds the first regularization term to the objective function of the initial interpretable medical event prediction model, so that based on the objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model, and then limits the model complexity through the regularization term, which helps to optimize feature weights, reduce the influence of unimportant features, thereby highlighting the role of important features, reducing overfitting, and improving the generalization ability of the model on new data, thereby enhancing the model interpretability and improving the prediction accuracy of the model.
[0091] In a feasible implementation, the iterative training of the initial interpretable medical event prediction model based on each of the cost-sensitive decision trees to obtain the interpretable medical event prediction model includes: Step S61, obtaining the model iteration parameters corresponding to the initial interpretable medical event prediction model and the average complexity corresponding to the cost-sensitive decision tree; It should be noted that the model iteration parameters refer to the parameters required by the model in the iteration, such as the parameters in the objective function, etc., which are not limited here. In addition, the average complexity refers to the average complexity calculated by the average depth, average number of nodes and average path length of each cost-sensitive decision tree, which is used to measure the overall complexity of the decision tree model and reflect the degree of fit of the model to the data and the risk of overfitting.
[0092] Specifically, according to the current iteration situation, the model iteration parameters corresponding to the initial interpretable medical event prediction model in the current iteration number and the average complexity corresponding to the cost-sensitive decision tree are obtained.
[0093] Step S62, inputting the model iteration parameter and the average complexity into a decision tree prediction model to obtain a second regularization term output by the decision tree prediction model, and updating the second regularization term into the objective function of the initial interpretable medical event prediction model; It should be noted that in each training iteration, directly calculating the path length of the decision tree requires traversing the entire decision tree, which may be very time-consuming on large-scale data sets. Therefore, by introducing a decision tree prediction model to learn the relationship between input data and path length, and then quickly predict the path length, the high computational cost of directly calculating the decision tree path length can be avoided, and the regularization strength can be dynamically adjusted to reduce memory and time overhead, and the training process can be accelerated. At the same time, since the output of the decision tree prediction model (such as the proxy network MLP (Multilayer Perceptron)) is a continuous value, it can provide a smoother regularization term, avoiding the discreteness and instability caused by directly calculating the path length, thereby helping the optimization algorithm to converge more stably and improve the training effect of the model.
[0094] It should be further explained that the decision tree prediction model refers to a model constructed using a decision tree algorithm, which can predict the target variable based on the input features, that is, the model iteration parameters of the model are used to predict data such as the path length of the decision tree, efficiently predict the path length or other complexity-related indicators, and add these indicators as regularization terms to the loss function of the neural network, thereby significantly improving the efficiency of updating the regularization term while reducing the computational cost.
[0095] Furthermore, the second regularization term refers to a new regularization term calculated based on the model iteration parameters and the average complexity, which takes into account the performance and complexity indicators of the model in the previous training stage, and is used to add additional constraints to the objective function of the model training to avoid overfitting and improve the generalization ability of the model.
[0096] Step S63, based on the updated objective function, iteratively train the initial interpretable medical event prediction model to obtain the interpretable medical event prediction model.
[0097] Specifically, according to the historical patient data set and the updated objective function, the initial interpretable medical event prediction model corresponding to the current number of iterations is iteratively trained to obtain the predicted value output by the initial interpretable medical event prediction model, and then based on the predicted value and the real medical event, the model loss value is calculated using the objective function containing the second regularization term. In this embodiment, the objective function can be set according to actual needs and is not specifically limited here. After the model loss value is calculated, the training process ends, and the error back propagation algorithm and the decision tree prediction model are used to update the model parameters in the initial interpretable medical event prediction model, and then the next training is carried out. During the training process, it is determined whether the updated initial interpretable medical event prediction model meets the preset training end conditions. If it does, the updated initial interpretable medical event prediction model is used as the interpretable medical event prediction model. If it does not, the model training continues, wherein the preset training end conditions include loss convergence and reaching the maximum iteration number threshold.
[0098] This embodiment obtains the model iteration parameters corresponding to the initial interpretable medical event prediction model and the average complexity corresponding to the cost-sensitive decision tree, and then inputs the model iteration parameters and the average complexity into the decision tree prediction model to obtain the second regularization term output by the decision tree prediction model, and updates the second regularization term to the objective function of the initial interpretable medical event prediction model, thereby iteratively training the initial interpretable medical event prediction model based on the updated objective function to obtain the interpretable medical event prediction model, and then by iteratively updating the objective function, the model can adapt to new data and feedback to achieve continuous improvement, and by considering the complexity of the cost-sensitive decision tree, medical resources can be more effectively allocated, such as the priority of data collection and processing, thereby effectively improving the accuracy of the model, solving the problem that the features used by the original tree regularization when constructing the decision tree are inconsistent with the expectations of the experts, and then providing doctors with more information through accurate predictions and interpretable models to support them in making better clinical decisions, so as to improve the quality of patient care by predicting possible medical events in advance and taking timely intervention measures.
[0099] In a feasible implementation manner, after inputting the patient data and the medical event to be predicted into the explainable medical event prediction model and obtaining the medical event prediction result output by the explainable medical event prediction model and the explainable decision tree, the method further includes: Step S71, pushing the medical event prediction result and the explainable decision tree to a target user for verification by the target user; Specifically, the medical event prediction results and the explainable decision tree are pushed to the target user for verification by the target user, wherein the pushing can be performed via text messages, emails, web pages, etc. in medical systems, mobile phones, computers and other mobile terminals, without limitation.
[0100] Step S72, obtaining the verification result of the target user; It should be noted that the verification results refer to the review and feedback of the target users (such as medical professionals) on the model prediction results and interpretable decision trees, including the following aspects: Prediction accuracy assessment: users evaluate the accuracy of the model prediction results to confirm whether the prediction is consistent with the actual situation; Decision tree rationality check: users check whether the logic and structure of the decision tree are reasonable and whether they are consistent with medical knowledge and clinical practice; Feature importance evaluation: users evaluate whether the features used in the model are appropriate and consistent with the relevant factors of disease prediction; Model interpretability feedback: users provide feedback on the interpretability of the model, indicating whether the model explanation is clear and easy to understand, and whether it helps to understand the prediction results; Model credibility evaluation: users evaluate the credibility of the model, including the stability, reliability and performance of the model in different situations; Improvement suggestions: users may provide suggestions for improving the model, such as adding or deleting certain features, adjusting model parameters, etc.; Error identification: users identify errors in model predictions, such as false positives or false negatives, and provide correct information; User experience feedback: users provide feedback on the overall experience of using the model, including the ease of use and interactivity of the model. There is no restriction here and it can be set according to actual needs.
[0101] Specifically, the verification result of the target user may be obtained through a user questionnaire or the like, which is not limited here.
[0102] Step S73, optimizing the explainable medical event prediction model based on the verification result.
[0103] Specifically, the verification results are analyzed through cooperation between data scientists and medical professionals to identify the deficiencies and room for improvement of the model, and then the interpretable medical event prediction model is adjusted according to the analysis results, such as reselecting or adjusting features, optimizing the decision tree structure, correcting data errors, improving the model's interpretation method, etc., so as to use the updated data and adjusted model parameters for a new round of model training and verification to evaluate the effectiveness of the improvement measures. Through multiple iterations of this process, the performance and interpretability of the model will be gradually improved by continuously absorbing new verification results and feedback, and ultimately a more accurate, reliable and easy-to-understand medical event prediction model will be achieved to better support medical decision-making and improve the quality of patient care.
[0104] This embodiment pushes the medical event prediction results and the explainable decision tree to the target user for verification by the target user, thereby obtaining the verification results of the target user, and optimizing the explainable medical event prediction model based on the verification results, and then collects feedback from the target user to discover and correct errors in the model prediction, thereby improving the accuracy of the model, helping to improve the model's explanatory power and making it easier for medical professionals to understand and accept it, improve their trust and acceptance of the model, and ensure that the model is continuously improved over time to adapt to new data and clinical needs.
[0105] For example, to help understand the implementation process of the medical event prediction method, please refer to Figure 4 , Figure 4 A schematic diagram of the process of cost-sensitive tree regularization in one embodiment of the medical event prediction method provided in the present application.
[0106] Specifically, the flowchart in the figure describes a process of iteratively optimizing a model, which combines tree regularization and cost-sensitive tree regularization techniques, wherein the process starts with an input data set, which is then used in a tree regularization step, in which a Shapley value (i.e., medical feature cost) is calculated by a preset cost quantification method, such as the SHAP method, to quantify the contribution of each feature to the model output. Subsequently, the medical feature cost value is added to the cost-sensitive operation to guide the cost-sensitive tree regularization process, in which the importance and cost of the feature are considered to optimize the construction of the decision tree, and then after the cost-sensitive tree regularization is completed, it is checked whether the iteration limit is reached; if not, the process is repeated by applying the SHAP method to further refine the model until the iteration condition is met, and the process ends, resulting in a regularized and cost-sensitive optimization model.
[0107] It should be noted that the examples in the figure are only used to understand the present application and do not constitute a limitation on the medical event prediction method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0108] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0109] This application also provides a medical event prediction device, please refer to Figure 5 , the medical event prediction device comprises: An acquisition module 51 is used to acquire patient data corresponding to a target user and a medical event to be predicted; The prediction module 52 is used to input the patient data and the medical event to be predicted into an explainable medical event prediction model to obtain the medical event prediction results and an explainable decision tree output by the explainable medical event prediction model, wherein the explainable medical event prediction model is obtained by training several groups of historical patient medical data after cost quantification.
[0110] The medical event prediction device is also used for: Acquire several groups of historical patient medical data, wherein the historical patient medical data includes several medical features; For any of the historical patient medical data, quantify the cost of each of the medical features to obtain a plurality of first medical feature costs, and construct a cost-sensitive decision tree based on each of the first medical feature costs; Based on each of the cost-sensitive decision trees, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
[0111] The medical event prediction device is also used for: Obtaining a second medical feature cost obtained by comprehensive scoring of each of the medical features by a domain expert; and / or, Calculate the third medical feature cost corresponding to each of the medical features by a preset cost quantification method; and / or, The importance of each of the medical features is evaluated by a large language model to obtain a plurality of fourth medical feature costs; Each first medical feature cost is determined based on each second medical feature cost, each third medical feature cost and / or each fourth medical feature cost.
[0112] The medical event prediction device is also used for: Determine an information gain calculation method corresponding to each of the first medical feature costs; Calculating the information gain corresponding to each of the medical features based on the information gain calculation methods and the first medical feature costs; Based on the information gains, a cost-sensitive decision tree is constructed.
[0113] The medical event prediction device is also used for: Calculating the complexity corresponding to each of the cost-sensitive decision trees; Calculating each of the complexities to obtain a first regularization term, and adding the first regularization term to the objective function of the initial interpretable medical event prediction model; Based on the objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
[0114] The medical event prediction device is also used for: Obtaining a model iteration parameter corresponding to the initial interpretable medical event prediction model and an average complexity corresponding to the cost-sensitive decision tree; Inputting the model iteration parameter and the average complexity into a decision tree prediction model to obtain a second regularization term output by the decision tree prediction model, and updating the second regularization term into the objective function of the initial interpretable medical event prediction model; Based on the updated objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
[0115] The medical event prediction device is also used for: Pushing the medical event prediction result and the explainable decision tree to a target user for verification by the target user; Obtaining a verification result of the target user; Based on the verification results, the explainable medical event prediction model is optimized.
[0116] The medical event prediction device provided by the present application adopts the medical event prediction method in the above-mentioned embodiment, and can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the medical event prediction device provided by the present application are the same as the beneficial effects of the medical event prediction method provided by the above-mentioned embodiment, and the other technical features in the medical event prediction device are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0117] The present application provides a medical event prediction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the medical event prediction method in the above-mentioned embodiment one.
[0118] Reference below Figure 6, which shows a schematic diagram of the structure of a medical event prediction device suitable for implementing the embodiment of the present application. The medical event prediction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The medical event prediction device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0119] like Figure 6 As shown, the medical event prediction device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1002 or the program loaded from the storage device 1003 to the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the medical event prediction device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the medical event prediction device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a medical event prediction device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0120] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0121] The medical event prediction device provided by the present application adopts the medical event prediction method in the above embodiment, which can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the medical event prediction device provided by the present application are the same as the beneficial effects of the medical event prediction method provided by the above embodiment, and the other technical features in the medical event prediction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0122] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0123] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0124] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the medical event prediction method in the above-mentioned embodiment.
[0125] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0126] The computer-readable storage medium may be included in the medical event prediction device; or may exist independently without being incorporated into the medical event prediction device.
[0127] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the medical event prediction device, the medical event prediction device: Obtain patient data corresponding to the target user and the medical events to be predicted; The patient data and the medical event to be predicted are input into an explainable medical event prediction model to obtain a medical event prediction result and an explainable decision tree output by the explainable medical event prediction model, wherein the explainable medical event prediction model is obtained by training several groups of historical patient medical data after cost quantification.
[0128] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0131] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned medical event prediction method, and can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the medical event prediction method provided in the above-mentioned embodiment, and will not be repeated here.
[0132] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the medical event prediction method as described above when the computer program is executed by a processor.
[0133] The computer program product provided in this application can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the medical event prediction method provided in the above embodiment, which will not be repeated here.
[0134] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A medical event prediction method, characterized in that: include: Obtain patient data corresponding to the target user and the medical events to be predicted; The patient data and the medical event to be predicted are input into an explainable medical event prediction model to obtain a medical event prediction result and an explainable decision tree output by the explainable medical event prediction model, wherein the explainable medical event prediction model is obtained by training several groups of historical patient medical data after cost quantification.
2. The medical event prediction method according to claim 1, characterized in that: The training process of the explainable medical event prediction model includes: Acquire several groups of historical patient medical data, wherein the historical patient medical data includes several medical features; For any of the historical patient medical data, quantify the cost of each of the medical features to obtain a plurality of first medical feature costs, and construct a cost-sensitive decision tree based on each of the first medical feature costs; Based on each of the cost-sensitive decision trees, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
3. The medical event prediction method according to claim 2, characterized in that: The cost quantification of each of the medical features to obtain a plurality of first medical feature costs includes: Obtaining a second medical feature cost obtained by comprehensive scoring of each of the medical features by a domain expert; and / or, Calculate the third medical feature cost corresponding to each of the medical features by a preset cost quantification method; and / or, The importance of each of the medical features is evaluated by a large language model to obtain a plurality of fourth medical feature costs; Each first medical feature cost is determined based on each second medical feature cost, each third medical feature cost and / or each fourth medical feature cost.
4. The medical event prediction method according to claim 2, characterized in that: The constructing a cost-sensitive decision tree based on the costs of each of the first medical features includes: Determine an information gain calculation method corresponding to each of the first medical feature costs; Calculating the information gain corresponding to each of the medical features based on each of the information gain calculation methods and each of the first medical feature costs; Based on the information gains, a cost-sensitive decision tree is constructed.
5. The medical event prediction method according to claim 2, characterized in that: The iterative training of the initial interpretable medical event prediction model based on each of the cost-sensitive decision trees to obtain the interpretable medical event prediction model includes: Calculating the complexity corresponding to each of the cost-sensitive decision trees; Calculating each of the complexities to obtain a first regularization term, and adding the first regularization term to the objective function of the initial interpretable medical event prediction model; Based on the objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
6. The medical event prediction method according to claim 2, characterized in that: The iterative training of the initial interpretable medical event prediction model based on each of the cost-sensitive decision trees to obtain the interpretable medical event prediction model includes: Obtaining a model iteration parameter corresponding to the initial interpretable medical event prediction model and an average complexity corresponding to the cost-sensitive decision tree; Inputting the model iteration parameter and the average complexity into a decision tree prediction model to obtain a second regularization term output by the decision tree prediction model, and updating the second regularization term into the objective function of the initial interpretable medical event prediction model; Based on the updated objective function, the initial interpretable medical event prediction model is iteratively trained to obtain the interpretable medical event prediction model.
7. The medical event prediction method according to claim 1, characterized in that: After inputting the patient data and the medical event to be predicted into the explainable medical event prediction model, and obtaining the medical event prediction result output by the explainable medical event prediction model and the explainable decision tree, the method further includes: Pushing the medical event prediction result and the explainable decision tree to a target user for verification by the target user; Obtaining a verification result of the target user; Based on the verification results, the explainable medical event prediction model is optimized.
8. A medical event prediction device, characterized in that: include: An acquisition module is used to acquire patient data corresponding to the target user and the medical events to be predicted; A prediction module is used to input the patient data and the medical event to be predicted into an explainable medical event prediction model to obtain the medical event prediction results and an explainable decision tree output by the explainable medical event prediction model, wherein the explainable medical event prediction model is obtained by training several groups of historical patient medical data after cost quantification.
9. A medical event prediction device, characterized in that: The medical event prediction device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the medical event prediction method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the medical event prediction method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Medical event prediction model training method, medical event prediction method and device
CN114203306A
Result interpretation method and device of intelligent medical diagnosis system, storage medium and computer program product
CN119207757A