A rheumatism and immunity disease feature classification method and system based on SHAP values
By employing a SHAP-based classification method for rheumatic and immune diseases, and utilizing an ensemble learning classifier to calculate feature contribution values in conjunction with physician recommendations, the complexity of rheumatic and immune disease classification is addressed, enabling more efficient disease feature identification and diagnosis.
Patent Information
- Application Number
- CN202211462336.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-11-21
AI Technical Summary
Rheumatic and immune diseases are classified in a complex manner, with diverse and similar symptoms. Current technologies struggle to accurately distinguish the characteristics of various diseases, resulting in low diagnostic efficiency and a high rate of misdiagnosis.
A rheumatic and immunological disease feature classification method based on SHAP values was adopted. The SHAP values of features were calculated using four ensemble learning classifiers: gcForest, XGBoost, LightGBM, and RF. Key features were selected and classified in combination with the professional advice of rheumatologists.
It improves the accuracy and efficiency of disease characteristic classification and diagnosis, reduces the misdiagnosis rate, helps doctors better grasp disease characteristic information, and improves the efficiency of medical diagnosis and treatment.
Smart Images

Figure CN115732096B_ABST
Abstract
Description
Technical Field
[0001] This invention integrates knowledge from fields such as medicine, information science, and computer applications, and specifically relates to a method and system for classifying the characteristics of rheumatic and immune diseases based on SHAP values. Background Technology
[0002] Rheumatology and immunology is a subspecialty within internal medicine, referring to a group of diseases primarily affecting bones, joints, and soft tissues. These diseases are linked to the autoimmune system, causing damage to various organ systems, including arthritis. Rheumatology and immunology are complex in classification, encompassing many types of diseases with diverse symptoms, some even exhibiting similar symptoms. Classifying rheumatology and immunology is a complex process. To better determine the type of rheumatology and immunology a patient has, it is necessary to carefully distinguish the characteristics of each disease, including clinical symptoms and auxiliary examination results. More precise disease characteristics allow for better disease classification. Summary of the Invention
[0003] This invention proposes a method and system for classifying rheumatic and immune disease characteristics based on SHAP values. It collects rheumatic and immune disease characteristic information from patients' past medical records, makes full use of it, assists doctors in treatment, reduces doctors' pressure, and improves the efficiency of medical diagnosis and treatment.
[0004] To achieve the above objectives, the technical solution adopted by this invention is: a classification method for rheumatic and immune disease characteristics based on SHAP values, comprising the following steps:
[0005] Based on the characteristics of rheumatic and immune diseases, an original feature dataset is constructed, wherein the features reflect the symptoms of rheumatic and immune diseases.
[0006] Based on the original feature dataset, a disease type dataset representing rheumatic and immune diseases corresponding to the features is constructed;
[0007] Based on the original feature dataset and the rheumatic immune disease type dataset, the SHAP value of each feature in the original feature dataset was calculated using four ensemble learning classifiers: gcForest, XGBoost, LightGBM, and RF.
[0008] Based on the SHAP values calculated by the four ensemble learning classifiers, the features under each classifier are sorted, and the features with the highest SHAP values are retained, which is 1 / 3 of the total number of features. The features retained by the four ensemble learning classifiers that are in the same position are defined as similar features. The classifier with the most similar features to the other three classifiers is selected as the classifier to be used.
[0009] The importance of a feature is evaluated based on the SHAP value of the feature calculated by the selected classifier.
[0010] Feature selection is based on the importance of the assessed features and in conjunction with the professional advice of rheumatologists.
[0011] Information on rheumatic and immune diseases is input into the selected classifier to obtain the disease type and its important features.
[0012] Characteristics of rheumatic and immune diseases include joint features, blood test features, and laboratory imaging features; joint features include the temporomandibular joint, shoulder joint, elbow joint, wrist joint, proximal interphalangeal joints, metacarpophalangeal joints, hip joint, knee joint, ankle joint, and / or metatarsophalangeal joints; blood test features include immunological test features and complete blood count (CBC) features; laboratory imaging features include joint imaging features and lung imaging features.
[0013] The original feature dataset covers all symptom information of rheumatic and immune diseases; the features are updated regularly, and the specific manifestations, duration, and examination indicators of the symptoms are clearly described in the features. For special symptoms that occur in more than one place, their number is specified.
[0014] When constructing a dataset representing disease types of rheumatic and immune diseases: Based on the original dataset of rheumatic and immune disease features, which includes joint features, blood test features, and laboratory imaging features, a corresponding dataset representing disease types is constructed based on the combination of these three types of features.
[0015] When calculating SHAP values for features in the original data feature set,
[0016] The SHAP values of features in the original feature dataset are calculated using gcForest, XGBoost, LightGBM, and RF classifiers respectively. For the gcForest classifier, KernelSHAP is used to calculate the SHAP values of features; for the XGBoost, LightGBM, and RF classifiers, TreeSHAP is used to calculate the SHAP values of features.
[0017] The specific steps are as follows:
[0018] First, the original feature dataset is input into the classifier;
[0019] Secondly, the SHAP framework assigns a SHAP value to each feature of each data point, which represents the contribution of the feature to the prediction result.
[0020] Finally, for each classifier, each feature is sorted by its SHAP value;
[0021] In the above steps, the SHAP value of each feature j The definition is as follows:
[0022] =
[0023] Where N represents the original feature dataset, |N| represents the number of elements in the dataset, S represents any feature subset of dataset N, |S| represents the number of elements in the subset, and Nleft{j} represents a subset of all elements in the sequence preceding feature j. The output of the model representing the feature subset S, This represents the cumulative contribution value of feature j;
[0024] Meanwhile, the time complexity of KernelSHAP is:
[0025]
[0026] The time complexity of TreeSHAP is:
[0027]
[0028] Where T is the number of individual trees, L is the maximum number of leaves in each tree, D is the maximum depth of each tree, and M is the maximum number of features in each tree.
[0029] When evaluating the importance of features based on the SHAP value calculated by the selected classifier,
[0030] First, the features are ranked according to their SHAP values;
[0031] Secondly, the importance of the features should be assessed based on the actual situation, taking into account the professional advice of rheumatologists.
[0032] When selecting features,
[0033] First, sort the features after evaluating their importance based on SHAP values;
[0034] Secondly, the characteristics mentioned above, after being assessed for importance under the guidance of rheumatologists, were ranked.
[0035] Finally, the features that rank higher after the two sorting processes are selected as important features.
[0036] It also provides a rheumatic immune disease feature classification system based on SHAP values, including an information collection module, a feature SHAP value-based classifier selection module, a feature selection module, and a classification module;
[0037] The information collection module is used to collect features of rheumatic and immune diseases and construct an original feature dataset, which reflects the symptoms of rheumatic and immune diseases. Based on the original feature dataset, under the professional guidance of rheumatologists, a disease type dataset reflecting the types of rheumatic and immune diseases is constructed.
[0038] Based on the feature SHAP value classifier selection module, after completing the original dataset of rheumatic and immune disease features, four ensemble learning classifiers, gcForest, XGBoost, LightGBM, and RF, are used to calculate the SHAP value of each feature in the original feature dataset, and a suitable classifier is determined based on the calculated feature SHAP value.
[0039] The feature selection module, based on the acquisition of the original feature dataset of rheumatic and immunological diseases, the dataset of rheumatic and immunological disease types, and a suitable classifier, evaluates the importance of disease features under the professional guidance of rheumatologists, and selects the important features after evaluation.
[0040] The classification module takes the characteristics of rheumatic and immune diseases as input, and after passing through a classifier, obtains the characteristics of the disease type.
[0041] The present invention can also provide a computer device, including a processor and a memory, wherein the memory is used to store a computer executable program, the processor reads the computer executable program from the memory and executes it, and the processor can implement the SHAP value-based rheumatic immune disease feature classification method described in the present invention when executing the executable program.
[0042] A computer-readable storage medium storing a computer program, which, when executed by a processor, enables the implementation of the SHAP-based rheumatic immune disease feature classification method of the present invention.
[0043] Compared with the prior art, the present invention has at least the following beneficial effects:
[0044] This invention uses a rheumatic and immune disease feature classification method based on SHAP values. Compared with existing rheumatic and immune disease feature classification methods, it can identify the most critical features of each disease when faced with numerous symptoms, providing important data for doctors to better classify and make decisions about disease features, thus helping to improve diagnostic efficiency; it can quickly classify similar symptoms, reducing the misdiagnosis rate; and it can help doctors grasp more disease feature information, improving their knowledge level. Attached Figure Description
[0045] Figure 1 This is a flowchart of a classification method for the characteristics of rheumatic and immune diseases.
[0046] Figure 2 This is a flowchart of the classification stages of a classification system for the characteristics of rheumatic and immune diseases.
[0047] Figure 3 This is a structural diagram of a classification system for the characteristics of rheumatic and immune diseases.
[0048] Figure 4 This is a schematic diagram of data interaction in a classification system for the characteristics of rheumatic and immune diseases. Detailed Implementation
[0049] 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, not all, of the embodiments of the present invention. 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.
[0050] according to Figure 1 The flowchart shown below illustrates the classification method for rheumatic and immune diseases, which mainly includes the following steps:
[0051] Step 1: Collect symptom information of rheumatic and immune diseases
[0052] Collecting symptom information for rheumatic and immunological diseases primarily involves reviewing medical records, reading professional literature, and consulting doctors and specialists. Symptom information includes joint details, blood test results, and imaging findings. Reviewing medical records provides a practical case perspective, supplementing knowledge gathered through other means and making the collected information more complete. Reading professional literature allows for the accumulation of a large number of medical terms and synonyms, ensuring greater consistency in the collected information.
[0053] Step 2, collect information on rheumatic and immune disease types
[0054] The collection of information on rheumatic and immunological diseases is primarily achieved through consulting relevant books, doctors, and specialists. Consulting books provides a complete list of disease types, while consulting doctors and specialists allows for estimation of the frequency distribution of disease occurrence.
[0055] Step 3: Calculate the SHAP values of the features using four classifiers.
[0056] Based on the information obtained in steps 1 and 2, a raw feature dataset and a dataset representing disease types in rheumatic and immune diseases can be constructed. Let N be the raw feature dataset for rheumatic and immune diseases. Take any subset S of N, and input S into four ensemble learning classifiers: gcForest, XGBoost, LightGBM, and RF, respectively, to obtain the outputs. Then the SHAP value of element j in S. It can be expressed by the following formula:
[0057] =
[0058] Where |N| represents the number of elements in the dataset, |S| represents the number of elements in the subset, and Nleft{j} represents a subset of all elements in the sequence preceding feature j. The output of the model representing the feature subset S, This represents the cumulative contribution value of feature j.
[0059] Step 3, determine the classifier to use.
[0060] First, the features of the four ensemble learning classifiers are sorted according to their calculated SHAP values.
[0061] Secondly, under the four ensemble learning classifiers, the features with the highest SHAP value, which constitute one-third of the total number of features, are retained.
[0062] Then, observe whether there are identical features in the same position among the features retained by the four ensemble learning classifiers, and define such features as similar features;
[0063] Finally, the classifier that has the most similar features to the other three classifiers among the four ensemble learning classifiers is selected and determined as the classifier to be used.
[0064] Step 4, assess feature importance
[0065] First, the features are ranked according to their SHAP values;
[0066] Secondly, the importance of the features should be assessed based on the actual situation, taking into account the professional advice of rheumatologists.
[0067] Step 5: Select features based on their importance.
[0068] First, sort the features after evaluating their importance based on SHAP values;
[0069] Secondly, the characteristics mentioned above, after being assessed for importance under the guidance of rheumatologists, were ranked.
[0070] Finally, the features that rank higher after the two sorting processes are selected as important features.
[0071] Step 6: Input the feature information into the selected classifier to obtain the result. This step forms a feature classification method based on SHAP values, and its classification process is as follows: Figure 2 As shown.
[0072] Figure 3The rheumatic immune disease feature classification system shown includes the following modules:
[0073] The information collection module is used to collect features of rheumatic and immune diseases and construct an original feature dataset, which reflects the symptoms of rheumatic and immune diseases. Based on the original feature dataset, under the professional guidance of rheumatologists, a characterization disease type dataset reflecting the types of rheumatic and immune diseases is constructed.
[0074] Based on the feature SHAP value classifier selection module, after completing the original dataset of rheumatic and immune disease features, four ensemble learning classifiers, gcForest, XGBoost, LightGBM, and RF, are used to calculate the SHAP value of each feature in the original feature dataset, and a suitable classifier is determined based on the calculated feature SHAP value.
[0075] The feature selection module, based on the acquisition of the original dataset of rheumatic and immunological disease features, the dataset of rheumatic and immunological disease types, and a suitable classifier, evaluates the importance of disease features under the professional guidance of rheumatologists, and selects the important features after evaluation.
[0076] The classification module takes the characteristics of rheumatic and immune diseases as input, and after passing through the classifier, obtains the characteristics of the disease type and its important features.
[0077] Figure 4 The diagram shows the interaction of a rheumatic and immune disease feature recognition system.
[0078] In real life, medical data comes from the actual diagnostic process. Through the system's information collection module, the latest and most common symptom information can be obtained. At the same time, other patient circumstances, such as past medical history and family history, must also be considered during the diagnostic process. Figure 4 In this invention, patients with rheumatic and immune diseases can input their disease information when interacting with the system, and obtain disease feature classification results through the feature recognition system described in this invention.
[0079] In addition, the present invention can also provide a computer device, including a processor and a memory, the memory being used to store a computer executable program, the processor reading part or all of the computer executable program from the memory and executing it, and the processor executing part or all of the executable program can realize the rheumatic immune disease feature classification method based on SHAP value described in the present invention.
[0080] On the other hand, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the SHAP-based rheumatic immune disease feature classification method described in the present invention.
[0081] The computer device may be a laptop, a desktop computer, or a workstation.
[0082] The processor can be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or an off-the-shelf programmable gate array (FPGA).
[0083] The memory described in this invention can be an internal storage unit of a laptop, desktop computer, or workstation, such as memory or hard disk; or it can be an external storage unit, such as a portable hard disk or flash memory card.
[0084] Computer-readable storage media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer-readable storage media can include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. Random access memory can include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).
[0085] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.
Claims
1. A classification method for rheumatic and immune diseases based on SHAP values, characterized in that, Includes the following steps: Based on the characteristics of rheumatic and immune diseases, an original feature dataset is constructed, wherein the features reflect the symptoms of rheumatic and immune diseases. Based on the original feature dataset, a disease type dataset representing rheumatic and immune diseases corresponding to the features is constructed; Based on the original feature dataset and the rheumatic immune disease type dataset, the SHAP value of each feature in the original feature dataset was calculated using four ensemble learning classifiers: gcForest, XGBoost, LightGBM, and RF. Calculating the SHAP value of each feature in the original feature dataset includes: calculating the SHAP value of the features in the original feature dataset using gcForest, XGBoost, LightGBM, and RF classifiers respectively; for the gcForest classifier, KernelSHAP is used to calculate the SHAP value of the features; for the XGBoost, LightGBM, and RF classifiers, TreeSHAP is used to calculate the SHAP value of the features. The specific steps are as follows: First, the original feature dataset is input into the classifier; Secondly, the SHAP framework assigns a SHAP value to each feature of each data point, which represents the contribution of the feature to the prediction result. Finally, for each classifier, each feature is sorted by its SHAP value; In the above steps, the SHAP value of each feature j The definition is as follows: = Where N represents the original feature dataset, |N| represents the number of elements in the dataset, S represents any feature subset of dataset N, |S| represents the number of elements in the subset, and Nleft{j} represents a subset of all elements in the sequence preceding feature j. The output of the model representing the feature subset S, This represents the cumulative contribution value of feature j; Meanwhile, the time complexity of KernelSHAP is: The time complexity of TreeSHAP is: Where T is the number of individual trees, L is the maximum number of leaves in each tree, D is the maximum depth of each tree, and M is the maximum number of features in each tree; Based on the SHAP values calculated by the four ensemble learning classifiers, the features under each classifier are sorted, and the features with the highest SHAP values are retained, which is 1 / 3 of the total number of features. The features retained by the four ensemble learning classifiers that are in the same position are defined as similar features. The classifier with the most similar features to the other three classifiers is selected as the classifier to be used. The importance of the features is evaluated based on the SHAP values calculated by the selected classifier. Feature selection is based on the importance of the assessed features and in conjunction with the professional advice of rheumatologists. Information on rheumatic and immune diseases is input into the selected classifier to obtain the disease type and its important features.
2. The method for classifying rheumatic and immune disease characteristics based on SHAP values according to claim 1, characterized in that, Characteristics of rheumatic and immune diseases include joint features, blood test features, and laboratory imaging features. Joint features include the temporomandibular joint, shoulder joint, elbow joint, wrist joint, proximal interphalangeal joints, metacarpophalangeal joints, hip joint, knee joint, ankle joint, and / or metatarsophalangeal joints; blood test features include immunological test features and complete blood count (CBC) test features; laboratory imaging features include joint imaging features and lung imaging features.
3. The method for classifying rheumatic and immune disease characteristics based on SHAP values according to claim 1, characterized in that, The original feature dataset covers all symptom information of rheumatic and immune diseases; the features are updated regularly, and the specific manifestations, duration, and examination indicators of the symptoms are clearly described in the features. For special symptoms that occur in more than one place, their number is specified.
4. The method for classifying rheumatic and immune disease characteristics based on SHAP values according to claim 1, characterized in that, When constructing a dataset representing disease types of rheumatic and immune diseases: Based on the original dataset of rheumatic and immune disease features, which includes joint features, blood test features, and laboratory imaging features, a corresponding dataset representing disease types is constructed based on the combination of these three types of features.
5. The method for classifying rheumatic and immune disease characteristics based on SHAP values according to claim 1, characterized in that, When evaluating the importance of features based on the SHAP value calculated by the selected classifier, First, the features are ranked according to their SHAP values; Secondly, the importance of the features should be assessed based on the actual situation, taking into account the professional advice of rheumatologists.
6. The method for classifying rheumatic and immune disease characteristics based on SHAP values according to claim 5, characterized in that, When selecting features, First, sort the features after evaluating their importance based on SHAP values; Secondly, the characteristics mentioned above, after being assessed for importance under the guidance of rheumatologists, were ranked. Finally, the features that rank higher after the two sorting processes are selected as important features.
7. A classification system for rheumatic and immune diseases based on SHAP values, characterized in that, It includes an information collection module, a feature SHAP value-based classifier selection module, a feature selection module, and a classification module; The information collection module is used to collect features of rheumatic and immune diseases and construct a raw feature dataset, wherein the features reflect the symptoms of rheumatic and immune diseases; Based on the original feature dataset, and under the professional guidance of rheumatologists, a disease type dataset reflecting the types of rheumatic and immunological diseases was constructed. Based on the feature SHAP value classifier selection module, after completing the original feature dataset of rheumatic and immune diseases, four ensemble learning classifiers, gcForest, XGBoost, LightGBM, and RF, are used to calculate the SHAP value of each feature in the original feature dataset, and the appropriate classifier is determined based on the calculated feature SHAP value. Calculating the SHAP value of each feature in the original feature dataset includes: calculating the SHAP value of the features in the original feature dataset using gcForest, XGBoost, LightGBM, and RF classifiers respectively; for the gcForest classifier, KernelSHAP is used to calculate the SHAP value of the features; for the XGBoost, LightGBM, and RF classifiers, TreeSHAP is used to calculate the SHAP value of the features. The specific steps are as follows: First, the original feature dataset is input into the classifier; Secondly, the SHAP framework assigns a SHAP value to each feature of each data point, which represents the contribution of the feature to the prediction result. Finally, for each classifier, each feature is sorted by its SHAP value; In the above steps, the SHAP value of each feature j The definition is as follows: = Where N represents the original feature dataset, |N| represents the number of elements in the dataset, S represents any feature subset of dataset N, |S| represents the number of elements in the subset, and Nleft{j} represents a subset of all elements in the sequence preceding feature j. The output of the model representing the feature subset S, This represents the cumulative contribution value of feature j; Meanwhile, the time complexity of KernelSHAP is: The time complexity of TreeSHAP is: Where T is the number of individual trees, L is the maximum number of leaves in each tree, D is the maximum depth of each tree, and M is the maximum number of features in each tree; The feature selection module, based on the acquisition of the original dataset of rheumatic and immunological disease features, the dataset of rheumatic and immunological disease types, and a suitable classifier, evaluates the importance of disease features under the professional guidance of rheumatologists, and selects the important features after evaluation. The classification module takes the characteristics of rheumatic and immune diseases as input, and after passing through a classifier, obtains the characteristics of the disease type.
8. A computer device, characterized in that, It includes a processor and a memory, the memory being used to store a computer-executable program, the processor reading the computer-executable program from the memory and executing it, and the processor executing the computer-executable program being able to implement the rheumatic immune disease characteristic classification method based on SHAP values as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program that, when executed by a processor, enables the classification method for rheumatic and immune disease characteristics based on SHAP values as described in any one of claims 1 to 6.
Citation Information
Patent Citations
A classification and prediction method based on multi-stage hybrid model
CN109242021A
Rheumatic immune drug recommendation method, system and device
CN112116978A