An explainability system, method, and electronic device for a mortality prediction model
By introducing global and individual interpretation modules and using SHAP and PDP analysis units to generate visual charts, the internal decision-making logic of machine learning models is explained, solving the problem of the difficulty in interpreting machine learning models and improving the trust and application of prediction results by clinicians and insurance underwriters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN NOEN MEDICAL EQUIP CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-07-10
AI Technical Summary
Machine learning models are difficult to widely apply in mortality prediction in the fields of healthcare and actuarial science because their internal decision-making logic is complex and difficult to interpret, resulting in low trust in their predictions by clinicians and insurance underwriters.
We introduce a global interpretation module and an individual interpretation module. We use the SHAP analysis unit to generate a visualization of the global feature importance ranking and the individual feature contribution distribution. Combined with the PDP analysis unit and the LIME method, we provide an interactive visualization interface to explain the internal decision-making logic of the mortality prediction model in detail.
By visualizing and quantifying the internal decision-making logic of the mortality prediction model, decision-makers' trust and acceptance are enhanced, making the model's prediction results easier to understand and apply.
Smart Images

Figure CN122369970A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of mortality prediction technology, specifically to an interpretable system, method, and electronic device for a mortality prediction model. Background Technology
[0002] In the fields of healthcare, actuarial science, and public health, machine learning models for predicting individual mortality rates have become an important tool for supporting critical decision-making. Complex models, such as random forests, gradient boosting decision trees, and deep neural networks, often surpass traditional statistical models like logistic regression in predictive accuracy due to their powerful nonlinear fitting capabilities. However, these high-performance machine learning models are often considered "black boxes" because their internal decision-making logic is complex and difficult to trace. Decision-makers such as clinicians and insurance underwriters are hesitant to trust predictions that lack a basis for reasoning, resulting in low adoption rates of machine learning models for decision-making and requiring further improvement. Summary of the Invention
[0003] The embodiments of this application provide an interpretability system, method, and electronic device for a mortality prediction model, which can solve the technical problem that machine learning models are often regarded as "black boxes" because their internal decision-making logic is complex and difficult to trace. Clinicians, insurance underwriters, and other decision-makers find it difficult to trust a prediction result that cannot provide reasoning basis, resulting in low adoption of machine learning models for decision-making assistance.
[0004] In a first aspect, embodiments of this application provide an interpretability system for a mortality prediction model, comprising: The prediction model module is used to store and run a trained machine learning model that predicts individual mortality risk based on multi-source feature data and calculates mortality prediction values. A global interpretation module is communicatively connected to the prediction model module. The global interpretation module includes a SHAP analysis unit, which is configured to: receive a historical sample dataset, calculate the SHAP value of the data features of each historical sample in the prediction model module relative to the prediction output, and generate a global feature importance ranking and individual feature contribution distribution visualization based on the SHAP values of all historical samples. The individual interpretation module is communicatively connected to the prediction model module, and the individual interpretation module is configured as follows: Receive the characteristic data of the target individual and the predicted mortality rate corresponding to the characteristic data; Based on the feature data of the target individuals, the SHAP value of the feature data of each target individual is calculated or the LIME method is applied to generate a local interpretation and output an individualized interpretation report. The individualized interpretation report points out the first key feature that drives the increase of the mortality prediction value, the second key feature that reduces the mortality prediction value, the quantitative contribution of the first key feature, and the quantitative contribution of the second key feature. The visualization interface module is used to integrate and render the output results of the global interpretation module and the individual interpretation module, and to provide users with an interactive visualization interface.
[0005] In one embodiment, the interpretability system of the mortality prediction model further includes a PDP analysis unit configured to generate and output a partial dependency graph for one or more selected features in the historical sample dataset, to show the average marginal effect curve of the value change of the selected features on the model prediction results.
[0006] In one embodiment, the horizontal axis of the partial dependency graph represents the value of the selected feature, and the vertical axis represents the average value of the individual mortality risk predicted by the machine learning model. The curve is used to reveal the non-linear relationship between the selected feature and the mortality risk.
[0007] In one embodiment, the visualization of individual feature contribution distribution is a bee swarm graph, wherein each point in the bee swarm graph represents a historical sample, the horizontal axis of the point is the SHAP value of the feature corresponding to the historical sample, the vertical axis of the point is the actual value of the feature corresponding to the historical sample, and the color of the point represents the magnitude of the actual value of the feature corresponding to the historical sample; and / or The individualized interpretation report is presented in the form of a feature contribution force map, where each feature is represented by a horizontal bar. The length of the horizontal bar represents the absolute value of the SHAP value of the corresponding feature, the direction of the horizontal bar represents the contribution direction, and the color of the horizontal bar distinguishes between positive and negative contributions.
[0008] In one embodiment, when the individual interpretation module applies the LIME method, it performs the following steps: Perturbation neighborhood samples are generated centered on the feature vector of the target individual; The prediction model module is used to obtain the predicted mortality rate of the neighborhood samples; A weighted linear model is trained as a local surrogate model to fit the predictions of the neighborhood samples; Feature weights are extracted from the linear model as interpretation rules.
[0009] In one embodiment, the machine learning model in the prediction model module is a tree-based ensemble model, including a random forest or gradient boosting decision tree model. The multi-source feature data includes activity data and baseline feature data. The activity data is collected by a wearable device worn by the target individual during a continuous monitoring period. The baseline feature data includes at least one of demographic features, health features, living environment features, and lifestyle features.
[0010] Secondly, this application also provides a method for model interpretation using the system described above, comprising: Global interpretation steps: Invoke the global interpretation module to generate and display a visualization of the global feature importance ranking and individual feature contribution distribution of the prediction model module based on the historical dataset; Individual interpretation steps: After obtaining the predicted mortality rate for the target individual, the individual interpretation module is invoked to generate and display a personalized interpretation report for the target individual; Explanation result delivery steps: Through the visualization interface module, the output results of the global explanation module and the individual explanation module are integrated and delivered to the end user.
[0011] In one embodiment, the global interpretation step further includes generating a partial dependency graph, the specific steps of generating the partial dependency graph including: Analyze all values of the selected feature in the historical dataset, and define multiple grid points within the value range of the selected feature; For each grid point, the selected feature value of all samples in the historical dataset is replaced with the grid point value, while keeping the original values of other features unchanged, thus forming the modified dataset; The modified dataset is input into the prediction model module to obtain multiple mortality prediction values. The average prediction value is obtained by calculating the average of the multiple mortality prediction values. Each grid point is associated with its corresponding average predicted value, and a partial dependency curve is plotted.
[0012] Thirdly, this application also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.
[0013] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0014] The beneficial effects of the embodiments of the present invention are as follows: The interpretability system for mortality prediction models provided by this invention introduces a dual interpretation mechanism: a global interpretation module and an individual interpretation module. The SHAP analysis unit of the global interpretation module generates a visualization of the global feature importance ranking and the individual feature contribution distribution, demonstrating the importance ranking of multi-source features when predicting mortality risk, enabling users to establish a macro-level understanding of the key aspects of the mortality prediction model. The individual interpretation module generates a personalized interpretation report, pointing out the key features and the quantitative contributions of crucial features that drive increases or decreases in mortality prediction values. Through this combination of macro-level understanding and micro-level attribution, the mortality prediction model's predictions are transformed from an incomprehensible "black box" into a verifiable chain of evidence. The internal decision-making logic of the mortality prediction model is systematically visualized and quantitatively presented to users, enhancing decision-makers' trust and acceptance of the model's prediction results. This effectively solves the core pain point of traditional models being difficult to implement due to their lack of interpretability. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the structure of an interpretability system for a mortality prediction model according to an embodiment of this application; Figure 2 This is an embodiment of the application. Figure 1 The flowchart shown is a method for interpreting the model in the system. Figure label: 1. Prediction model module; 2. Global interpretation module; 3. Individual interpretation module; 4. Visualization interface module. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Furthermore, it should be understood that the specific embodiments described herein are only for illustration and explanation of the present invention and are not intended to limit the present invention. In the present invention, unless otherwise stated, directional terms such as "upper" and "lower" generally refer to the upper and lower positions of the device in actual use or operation, specifically the drawing directions in the accompanying drawings; while "inner" and "outer" refer to the outline of the device.
[0018] Please refer to Figure 1 This invention proposes an interpretability system for a mortality prediction model, comprising a prediction model module 1, a global interpretation module 2, an individual interpretation module 3, and a visualization interface module 4.
[0019] The prediction model module is used to store and run a trained machine learning model that predicts an individual's risk of death based on multi-source feature data and calculates the predicted mortality rate.
[0020] The global interpretation module communicates with the prediction model module. The global interpretation module includes a SHAP analysis unit, which is configured to: receive historical sample datasets, calculate the SHAP value of the data features of each historical sample in the prediction model module relative to the prediction output, and generate a global feature importance ranking and a visualization of the individual feature contribution distribution based on the SHAP values of all historical samples.
[0021] The individual interpretation module communicates with the prediction model module, and the individual interpretation module is configured as follows: Receive the characteristic data of the target individual and the corresponding mortality prediction value of the characteristic data; Based on the feature data of the target individuals, the SHAP value of the feature data of each target individual is calculated or the LIME method is applied to generate a local interpretation and output an individualized interpretation report. The individualized interpretation report points out the first key feature that drives the increase in the mortality prediction value, the second key feature that reduces the mortality prediction value, the quantitative contribution of the first key feature and the quantitative contribution of the second key feature.
[0022] The visualization interface module is used to integrate and render the output results of the global interpretation module and the individual interpretation module, and to provide users with an interactive visualization interface.
[0023] In this embodiment, a dual interpretation mechanism of a global interpretation module and an individual interpretation module is introduced. The SHAP analysis unit of the global interpretation module generates a global feature importance ranking and an individual feature contribution distribution visualization, which shows the importance ranking of multi-source features when predicting mortality risk, enabling users to establish a macro-level understanding of the focus of the mortality prediction model. The individual interpretation module generates a personalized interpretation report, pointing out the key features and the quantitative contribution of key features that drive the increase or decrease of mortality prediction values. Through this combination of macro-level understanding and micro-level attribution, the prediction of the mortality prediction model is transformed from an incomprehensible "black box" into a verifiable chain of evidence. The internal decision-making logic of the mortality prediction model is systematically visualized and quantitatively presented to users, enhancing decision-makers' trust and acceptance of the model's prediction results, thereby effectively solving the core pain point of traditional models being difficult to implement due to their lack of interpretability.
[0024] Furthermore, the personalized interpretation report not only lists influencing factors but also provides SHAP values as a quantitative contribution. This allows users to distinguish between primary and secondary contradictions, prioritizing actions on the features with the highest contribution values during risk intervention to achieve optimal resource allocation. The visualization interface module provides feature contribution force maps, bee swarm diagrams, and other visual aids, transforming complex numerical relationships into intuitive graphs. Doctors can instantly see a patient's risk composition, and insurance analysts can quickly identify key risk factors for high-risk policies. This intuitive presentation significantly lowers the professional barrier, enabling domain experts without technical backgrounds to efficiently understand and utilize model insights, thereby making more accurate clinical decisions or risk assessments.
[0025] In this embodiment, the SHAP analysis unit is an interpretable artificial intelligence (XAI) computational unit based on the Shapley Value principle in cooperative game theory. The core function of the SHAP analysis unit is to provide a consistent and additive feature attribution scheme for each prediction made by the complex machine learning model in the prediction model module. Specifically, for any input sample, the SHAP analysis unit can calculate the marginal contribution of each feature in the sample to that specific prediction result relative to the baseline (the average prediction when all features are missing). This contribution value is the SHAP value.
[0026] In this embodiment, the machine learning prediction model can automatically learn and characterize the specific nonlinear relationship between data and mortality risk, capturing key, easily overlooked nonlinear patterns, making the prediction more in line with medical reality.
[0027] In this embodiment, the SHAP analysis unit receives a historical sample dataset and calculates the SHAP value for all features for each sample. Then, for each feature, it takes the average of the absolute values of the SHAP values for that feature across all samples. This average is the global importance score for that feature. Based on this score, the SHAP analysis unit can generate a global feature importance ranking visualization (such as a bar chart), visually demonstrating that features such as "age" and "mean acceleration" are the most relied-upon decision bases for the model. To further illustrate how features influence prediction, the SHAP analysis unit also correlates the actual value of each sample and each feature with the corresponding SHAP value to obtain an individual feature contribution distribution visualization, such as a Beeswarm Plot. In this Beeswarm Plot, each point represents a sample, with its horizontal axis (X-axis) representing the SHAP value (contribution) of a certain feature (such as "diastolic blood pressure") for that sample, and its vertical axis (Y-axis) representing the actual value range of that feature. The color intensity of the point represents the level of the actual value. Bee swarm diagrams can reveal swarm patterns such as "high diastolic blood pressure typically produces a positive SHAP value (increased risk), while low diastolic blood pressure typically produces a negative SHAP value (reduced risk)."
[0028] In this embodiment, the individual explanation module is a computational and analytical module specifically designed to provide customized, causal explanations for the model prediction results of a single individual (target user). Unlike the global explanation module, which focuses on revealing the overall patterns of the model, the individual explanation module aims to answer the question, "Why did this person receive such a specific risk score?" It receives the target individual's complete feature data vector and its corresponding mortality prediction value calculated by the prediction model module, and outputs a structured individual explanation report that clearly indicates which personal characteristics, in what way (driving or reducing), and to what extent they influenced the prediction result.
[0029] In one specific embodiment, the individual interpretation module can perform individual interpretation based on SHAP values. This mode directly calls or calculates the SHAP value of each feature of the target individual relative to the model prediction. The individual interpretation module can first receive the target individual feature data or obtain its pre-calculated SHAP value from the global interpretation module; then, the individual interpretation module sorts and formats these SHAP values; then, it generates an interpretation mainly in the form of a feature contribution force map. In the feature contribution force map, each feature is represented by a horizontal bar. The length of the bar represents the absolute value of the feature's SHAP value (contribution size), the direction of the bar (left or right) represents its contribution direction (reducing or increasing risk), and the color (such as red / blue) visually distinguishes positive and negative contributions. The individualized interpretation report clearly lists the first key feature (such as "Age: 68 years old", contribution +0.12) and the second key feature (such as "No hospitalization history in the past year", contribution -0.05).
[0030] In another specific embodiment, the individual interpretation module can perform individual interpretation based on LIME (Local Interpretable Model-agnostic Explanations). This mode constructs a locally interpretable surrogate model (usually a linear model) near the data points of the target individual to approximate the behavior of a complex black-box model in that local region. The coefficients of the surrogate model represent the local interpretation of the original model's prediction. The individual interpretation module can first generate a neighborhood sample set centered on the original feature vector of the target individual through bounded random perturbation (e.g., sampling based on feature distribution). Then, the generated neighborhood sample set is input into the prediction model module to obtain the corresponding mortality prediction value. Based on the similarity between the neighborhood samples and the target individual (usually using a kernel function to define the weights), a weighted simple model (such as linear regression or decision tree) is trained. This simple model is the local surrogate model, and the weight coefficients of each feature are extracted from the trained local surrogate model. These weights directly and understandably indicate the local importance and direction of influence of each feature on the prediction result in the context of the target individual. Finally, an individualized interpretation report is generated.
[0031] In this embodiment, the individual interpretation module structures and encapsulates the interpretation data (key feature list, quantified contribution value, and contribution direction) generated by any one or two of the above modes to form a standardized individual interpretation report. This individual interpretation report is then sent to the visualization interface module for rendering, ultimately presenting it to the end user in the form of an interactive chart. The interactive visualization interface described in this embodiment, based on its responsive web design, cross-platform framework, or standardized graphics API implementation, possesses device-independent universality and can be deployed and presented on various computing terminal devices to adapt to the decision-making needs of different user scenarios. Specifically, it can be adapted to devices such as computers, mobile phones, watches, and electronic whiteboards.
[0032] In one embodiment, the machine learning model in the prediction model module is a tree-based ensemble model, including random forest or gradient boosting decision tree models.
[0033] In one embodiment, the multi-source feature data includes activity data and baseline feature data. Activity data originates from raw activity data collected by wearable devices (e.g., smartwatches, smart bracelets, professional sports watches, smart glasses, sports chest straps, etc.) worn by the target individual over a continuous monitoring period (e.g., 7 consecutive days). Activity data includes at least one of heart rate, steps, distance traveled, cadence, acceleration, and speed. Before calculation, the raw activity data needs to be calibrated and its validity assessed, eliminating invalid data segments due to device not being worn, abnormal signals, or insufficient monitoring duration, ensuring that the analysis is based on data from valid monitoring times. In this embodiment, the simplest arithmetic mean is used, providing the most basic but essential continuous activity intensity information for a powerful nonlinear model. Baseline characteristics include at least one of demographic characteristics, health characteristics, living environment characteristics, and lifestyle characteristics; demographic characteristics include at least one of age, sex, education level, income level, and marital status; lifestyle characteristics include at least one of sleep duration, smoking status, and alcohol consumption status; health characteristics include at least one of body mass index, body fat percentage, systolic blood pressure, diastolic blood pressure, history of diabetes, history of cancer, history of heart disease, recent hospitalization history, and long-term medication use; living environment characteristics include at least one of air quality, water quality, noise pollution level, climate conditions, and safety of the living environment (such as local crime rate, presence of war, etc.).
[0034] In one embodiment, the interpretability system for the mortality prediction model further includes a PDP (Partial Dependence Plot) analysis unit. The PDP analysis unit is configured to generate and output a partial dependency plot for one or more selected features in a historical sample dataset, illustrating the average marginal effect curve of changes in the values of the selected features on the model's prediction results. The PDP analysis unit is an interpretable analysis unit used to visualize and quantify the average functional relationship between a single feature or a set of features and the prediction results of a machine learning model. The PDP analysis unit can visually demonstrate how, on average, the model's predicted mortality risk responds when a specific feature changes within its actual value range.
[0035] In one embodiment, the horizontal axis of the partial dependency graph represents the value of the selected feature, the vertical axis represents the average value of the individual mortality risk predicted by the machine learning model, and the curve is used to reveal the non-linear relationship between the selected feature and the mortality risk.
[0036] Specifically, users can select one or more features to be analyzed (e.g., "age") through a visual interface. The PDP analysis unit will define a set of equally spaced grid points within the actual minimum and maximum range of the feature, covering the possible value space of the feature. For each grid point value (denoted as...), the PDP will analyze the data. The PDP analysis unit performs the following operations: S1. Obtain historical sample dataset (i.e., all features except the selected feature "age"), the dataset Replace the selected feature value of each sample with the value of the current grid point. At the same time, the original values of all other features of the sample remain completely unchanged. This generates a modified dataset. .
[0037] S2. The modified dataset described above... Input the entire prediction model module described above. The prediction model is... Each "artificial" sample outputs a predicted mortality rate. The PDP analysis unit then calculates the arithmetic mean of all these predictions, yielding a result for selected feature values. At that time, the model's average predicted value . The mathematical expression is: ,in It is the number of historical samples. It is a predictive model. It is the first Other feature values of the sample.
[0038] S3. Repeat steps S1 and S2, iterating through all predefined grid points. Finally, the PDP analysis element will analyze each grid point... Its corresponding average predicted value The correlation is plotted as a two-dimensional curve. The horizontal axis of the two-dimensional curve represents the values of the selected features, and the vertical axis represents the average value of the individual mortality risk (usually a probability value) predicted by the model. This curve is the average marginal effect curve.
[0039] In this embodiment, the PDP analysis unit provides a stable, intuitive, and easy-to-understand method to explore and verify the functional dependencies between features learned by the black-box model and predictions. The average marginal effect curve generated by the PDP analysis unit can clearly reveal the complex relationship patterns between selected features and individual mortality risk. For example, it may show that mortality risk increases slowly before age 60, rises sharply between 60 and 75 years old, and then slows down again, exhibiting a clear non-linear saturation effect. This insight cannot be provided by simple correlation analysis or global importance ranking. Therefore, the output of the PDP analysis unit is an important supplement and deepening of the global importance ranking generated by the SHAP analysis unit. Global importance ranking tells users "age is important," while the average marginal effect curve further explains "how age is important"—it answers the key question of "how risk specifically changes with age" in a visual form, greatly enhancing the transparency and auditability of model behavior.
[0040] In one embodiment, the visualization of individual feature contribution distribution is a bee swarm plot, where each point in the bee swarm plot represents a historical sample. The x-axis of the point is the SHAP value of the feature corresponding to the historical sample, the y-axis is the actual value of the feature corresponding to the historical sample, and the color of the point represents the magnitude of the actual value of the feature corresponding to the historical sample. The bee swarm plot can simultaneously present the global importance of features, the direction of contribution (positive / negative), and the relationship between feature value distribution and contribution value in a single plot, providing high information density and intuitiveness.
[0041] In one embodiment, the personalized interpretation report is presented in the form of a feature contribution force plot, where each feature is represented by a horizontal bar. The length of the horizontal bar represents the absolute value of the corresponding feature's SHAP value, the direction of the horizontal bar represents the direction of contribution, and the color of the horizontal bar distinguishes between positive and negative contributions. The individual feature contribution force plot can clearly and quantitatively display the "push" and "pull" of each feature in the individual prediction, making personalized interpretation readily apparent.
[0042] In one embodiment, when the individual interpretation module applies the LIME method, it performs the following steps: S11. Generate perturbation neighborhood samples centered on the feature vector of the target individual; S12. Use the prediction model module to obtain the predicted mortality rate of neighborhood samples; S13. Train a weighted linear model as a local surrogate model to fit the prediction of neighborhood samples; S14. Extract feature weights from the linear model as interpretation rules.
[0043] In this embodiment, the LIME method generates perturbation samples and fits a local surrogate model. This method can generate faithful and understandable explanations for any complex model (model independence). Even for extremely complex ensemble models such as random forests, it can generate simple explanations similar to linear rules for individual predictions (e.g., "Your risk score is high because you are over 65 years old and your weekly activity level is less than 1000 kcal"). This rule-based explanation is more in line with human cognitive habits, enhancing the affinity and persuasiveness of the explanation.
[0044] refer to Figure 2 This application also provides a method for model interpretation using the system described above, comprising: S01, Global Interpretation Steps: Call the global interpretation module to generate and display a visualization of the global feature importance ranking and individual feature contribution distribution of the prediction model module based on the historical dataset; S02, Individual Interpretation Step: After obtaining the predicted mortality rate for the target individual, the individual interpretation module is invoked to generate and display a personalized interpretation report for the target individual. S03, Explanation Result Delivery Steps: Through the visualization interface module, the output results of the global explanation module and the individual explanation module are integrated and delivered to the end user.
[0045] In this embodiment, a fixed sequence of global interpretation (S01) followed by individual interpretation (S02) guides users to build a complete understanding from macro to micro levels. Users first understand the model's overall behavior and key risk factors (e.g., "age and physical activity are the most important features") through global interpretation, forming basic trust and a knowledge framework. Subsequently, when making decisions for specific individuals, personalized attribution analysis (e.g., "This patient's high risk is mainly due to recent hospitalization") is obtained through individual interpretation. This "see the forest before the trees" process design aligns with human cognitive patterns, enabling data-driven insights to be efficiently and naturally transformed into precise individual-level decision support, completing a closed loop from statistical analysis to personalized services. Furthermore, this method encapsulates the complex underlying algorithm calls and calculation processes, such as SHAP, into simple instructions. Users (e.g., clinicians, insurance underwriters) do not need machine learning or algorithm expertise; they only need to follow the intuitive three-step process of "calling the global interpretation module, calling the individual interpretation module, and viewing the delivery results" to obtain a professional-grade model interpretation report. The interpretation result delivery step (S03) integrates and visualizes the results through a unified interface. This improves the ease of use and deployability of the method.
[0046] In one embodiment, the global interpretation step further includes generating a partial dependency graph, the specific steps of which include: S111. Analyze all values of the selected feature in the historical dataset, and define multiple grid points within the value range of the selected feature; S112. For each grid point, replace the selected feature values of all samples in the historical dataset with the grid point values, while keeping the original values of other features unchanged, to form the modified dataset. S113. Input the modified dataset into the prediction model module to obtain multiple mortality prediction values. Calculate the average of the multiple mortality prediction values to obtain the average prediction value. S114. Associate each grid point with the corresponding average predicted value and plot a partial dependency curve.
[0047] In this embodiment, the method for generating partial dependency graphs systematically defines grid points, replaces feature values, and calculates average predicted values, transforming the abstract question of "how feature changes affect predictions" into a controllable and quantifiable scientific experiment. Compared to observing scatter plots of the original data or intermediate results within the dependency model, this method actively intervenes in the input data and averages the random effects of other feature changes, thereby separating the pure average marginal effect of the target feature. This computational process ensures that regardless of the dataset distribution, as long as the same steps are followed, the analysis of the same feature can yield stable and comparable results, greatly improving the rigor and repeatability of model analysis. Furthermore, by traversing the feature value range (grid points) and recording the nonlinear response of the model output (average predicted value), the partial dependency curves drawn by this method can intuitively display arbitrarily complex relationship shapes, such as U-shaped curves, saturation curves, threshold effects, etc. For example, it can clearly show that the risk of death accelerates after a certain age threshold (such as 60 years old), or that the benefits diminish after physical activity reaches a certain level. This visualized nonlinear insight cannot be provided by simple statistical indicators and helps researchers discover new medical hypotheses or risk patterns.
[0048] In addition, the present invention also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.
[0049] In some embodiments, the memory can be an internal storage unit of the electronic device, such as a hard drive or RAM. In other embodiments, the memory can be an external storage device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 10 can include both internal and external storage units. The memory is used to store application software and various types of data installed on the electronic device, such as the program code of the electronic device.
[0050] In some embodiments, the processor may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in memory or process data.
[0051] In addition, the present invention provides a computer-readable storage medium in which a computer program, when executed by a processor, implements the method described above.
[0052] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0053] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.
[0054] The embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An interpretability system for a mortality prediction model, characterized in that, include: The prediction model module is used to store and run a trained machine learning model that predicts individual mortality risk based on multi-source feature data and calculates mortality prediction values. A global interpretation module is communicatively connected to the prediction model module. The global interpretation module includes a SHAP analysis unit, which is configured to: receive a historical sample dataset, calculate the SHAP value of the data features of each historical sample in the prediction model module relative to the prediction output, and generate a global feature importance ranking and individual feature contribution distribution visualization based on the SHAP values of all historical samples. The individual interpretation module is communicatively connected to the prediction model module, and the individual interpretation module is configured as follows: Receive the characteristic data of the target individual and the predicted mortality rate corresponding to the characteristic data; Based on the feature data of the target individuals, the SHAP value of the feature data of each target individual is calculated or the LIME method is applied to generate a local interpretation and output an individualized interpretation report. The individualized interpretation report points out the first key feature that drives the increase of the mortality prediction value, the second key feature that reduces the mortality prediction value, the quantitative contribution of the first key feature, and the quantitative contribution of the second key feature. The visualization interface module is used to integrate and render the output results of the global interpretation module and the individual interpretation module, and to provide users with an interactive visualization interface.
2. The system according to claim 1, characterized in that, The interpretability system of the mortality prediction model also includes a PDP analysis unit, which is configured to generate and output a partial dependency graph for one or more selected features in the historical sample dataset to show the average marginal effect curve of the value change of the selected feature on the model prediction result.
3. The system according to claim 2, characterized in that, The horizontal axis of the partial dependency graph represents the value of the selected feature, and the vertical axis represents the average value of the individual mortality risk predicted by the machine learning model. The curve is used to reveal the non-linear relationship between the selected feature and the mortality risk.
4. The system according to any one of claims 1-3, characterized in that, The visualization of individual feature contribution distribution is a bee colony graph, where each point in the bee colony graph represents a historical sample. The horizontal axis of the point is the SHAP value of the feature corresponding to the historical sample, the vertical axis is the actual value of the feature corresponding to the historical sample, and the color of the point represents the magnitude of the actual value of the feature corresponding to the historical sample; and / or The individualized interpretation report is presented in the form of a feature contribution force map, where each feature is represented by a horizontal bar. The length of the horizontal bar represents the absolute value of the SHAP value of the corresponding feature, the direction of the horizontal bar represents the contribution direction, and the color of the horizontal bar distinguishes between positive and negative contributions.
5. The system according to any one of claims 1-3, characterized in that, When the individual interpretation module applies the LIME method, it performs the following steps: Perturbation neighborhood samples are generated centered on the feature vector of the target individual; The prediction model module is used to obtain the predicted mortality rate of the neighborhood samples; A weighted linear model is trained as a local surrogate model to fit the predictions of the neighborhood samples; Feature weights are extracted from the linear model as interpretation rules.
6. The system according to any one of claims 1-3, characterized in that, The machine learning model in the prediction model module is a tree-based ensemble model, including random forest or gradient boosting decision tree models. The multi-source feature data includes activity data and baseline feature data. The activity data is collected by the wearable device worn by the target individual during a continuous monitoring period. The baseline feature data includes at least one of demographic features, health features, living environment features, and lifestyle features.
7. A method for model interpretation using the system as described in any one of claims 1-6, characterized in that, include: Global interpretation steps: Invoke the global interpretation module to generate and display a visualization of the global feature importance ranking and individual feature contribution distribution of the prediction model module based on the historical dataset; Individual interpretation steps: After obtaining the predicted mortality rate for the target individual, the individual interpretation module is invoked to generate and display a personalized interpretation report for the target individual; Explanation result delivery steps: Through the visualization interface module, the output results of the global explanation module and the individual explanation module are integrated and delivered to the end user.
8. The method according to claim 7, characterized in that, The global interpretation step further includes generating a partial dependency graph, the specific steps of which include: Analyze all values of the selected feature in the historical dataset, and define multiple grid points within the value range of the selected feature; For each grid point, the selected feature value of all samples in the historical dataset is replaced with the grid point value, while keeping the original values of other features unchanged, thus forming a modified dataset; The modified dataset is input into the prediction model module to obtain multiple mortality prediction values. The average prediction value is obtained by calculating the average of the multiple mortality prediction values. Each grid point is associated with its corresponding average predicted value, and a partial dependency curve is plotted.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as claimed in claim 7 or 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in claim 7 or 8.