Immune-related interstitial pneumonia differential diagnosis method and system based on machine learning algorithm
By applying machine learning algorithms on CT imaging and clinical data, a joint model was constructed, and the problem of difficult to distinguish immune-related pneumonia CIP from other pneumonia in the existing technology was solved, and efficient and non-invasive differential diagnosis was achieved.
Patent Information
- Application Number
- CN202510151415.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-05-30
AI Technical Summary
The prior art is difficult to effectively distinguish immune-related pneumonia CIP from other types of pneumonia, especially when imaging similarities are performed, and non-invasive differential diagnosis methods are lacking.
Using a machine learning algorithm-based method, a joint model was constructed to identify immune-related pneumonia CIP through CT imaging data and clinical structured data. The specific steps include: collecting patient data, performing image preprocessing, extracting imaging features, constructing an image differentiation model, combining clinical features to build a joint model, and finally performing differential diagnosis.
The accuracy of CT image processing is improved, and the rapid identification of immune-related pneumonia CIP and other types of pneumonia is achieved, which reduces the risk of trauma and enhances the predictive ability of different types of pneumonia.
Smart Images

Figure CN120072267A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to medical image processing technology, and in particular to a differential diagnosis method and system for immune-related interstitial pneumonia based on a machine learning algorithm. Background Art
[0002] Immune checkpoint inhibitor-associated interstitial pneumonia is a common adverse reaction to immunotherapy. Its imaging features are similar to those of severe infectious and radiation-induced pneumonitis, requiring invasive testing for differential diagnosis.
[0003] Because immune-related pneumonia (CIP) and other types of pneumonia (such as bacterial, viral, and fungal infections, severe radiation-induced pneumonia, and severe obstructive pneumonia) may exhibit similar imaging features, differential diagnosis is challenging. Because some patients with CIP do not have sputum available for sputum culture at the onset of CIP, and fiberoptic bronchoscopy is not recommended due to the risk of exacerbating the disease, developing a noninvasive differential diagnostic method is crucial for the diagnosis of CIP.
[0004] Artificial intelligence technology is currently developing rapidly, especially in the field of image recognition, with significant breakthroughs in security monitoring, traffic management, facial recognition, military, and medical fields. Radiomics combined with machine learning offers a potential solution to this challenge. By extracting large amounts of data from non-invasive imaging examinations such as CT, diagnostic models can be established. Previously, scholars have used radiomics to construct different models to distinguish between immune-related pneumonia (CIP) and radiation-induced pneumonia, but these models have small sample sizes and fail to cover all types of lung inflammation. Tohidinezhad et al. constructed a linear model using CT data to distinguish between immune-related pneumonia (CIP) and all other pneumonias, but the small sample size and low complexity of the linear model may not fully capture the complex relationships between the data. Summary of the Invention
[0005] In order to overcome the shortcomings of the existing technology, the purpose of the present invention is to provide a differential diagnosis method and system for immune-related interstitial pneumonia based on a machine learning algorithm, which can improve the accuracy of CT image processing to promote the rapid identification of the cause of severe pneumonia.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] In a first aspect, the present invention provides a method for differential diagnosis of immune-related interstitial pneumonia based on a machine learning algorithm, the method comprising the following steps:
[0008] S1: Collect the patient's clinical structured data and lung CT imaging data;
[0009] S2: Preprocessing the lung CT image using image processing technology to segment the effective lung area;
[0010] S3: Randomly divide patient data into training set and validation set;
[0011] S4: Using a random forest method to extract meaningful imaging features and construct an image identification model, the image identification model is trained using a training set, its parameters are adjusted by learning from the data in the training set, the performance of the model is evaluated using a validation set, and the hyperparameters of the model are adjusted to obtain an optimized image identification model;
[0012] S5: Calculating the corresponding radiomics score using the optimized image identification model;
[0013] S6: Build a clinical feature model based on clinical structured data and output risk clinical factors;
[0014] S7: constructing a joint model based on the corresponding radiomics score and the risk clinical factors;
[0015] S8: The combined model is used to predict and output the data of the patient to be differentially diagnosed, thereby obtaining the patient's final differential diagnosis result.
[0016] Furthermore, in step S1, collecting the patient's clinical structured data and lung CT image data includes:
[0017] The patient's clinical structured data is collected from the electronic medical record, the DICOM format file of the patient's lung CT image is downloaded, and the image is resampled to an isotropic voxel size. The clinical structured data includes one or more of gender, age, tumor type, type of immunotherapy drug used, smoking history, radiotherapy history, and PDL1 expression level.
[0018] Furthermore, in step S2, the lung CT image is pre-processed using image processing technology to segment the effective lung area, including:
[0019] S2.1: Manually identify the area with the most severe inflammation;
[0020] S2.2: Use 3D slicer software to outline a cylindrical ROI region with a diameter of 20 mm and a height of 20 mm in the center of the region.
[0021] S2.3: For each ROI region, the histogram features and eight radiomics filter features are calculated, namely: HHH, HHL, HLH, LHH, LLH, LHL, HLL, LLL, where H represents a high-pass filter and L represents a low-pass filter;
[0022] S2.4: Perform Z-normalization on the radiomics filter features to reduce data variability;
[0023] S2.5: Use the PyRadiomics standardization method to extract imaging features from the normalized radiomics filter features, calculate consistency using the intraclass correlation coefficient (ICC), and retain features with an ICC greater than 0.75;
[0024] S2.6: Use the random forest classifier combined with the SelectFromModel method to select key features based on the feature importance threshold;
[0025] S2.7: Integrate and save the filtered features, target variables, and identifiers.
[0026] Furthermore, in step S3, the patient data is randomly divided into a training set and a validation set, including:
[0027] The random module in the Python standard library was used to generate random numbers and perform random selection, and the integrated and stored patient data were divided into a training set and a validation set, where the ratio of the training set to the validation set was 7:3.
[0028] Furthermore, in step S4, a random forest method is used to extract meaningful imaging features to construct an image identification model, the image identification model is trained using a training set, its parameters are adjusted by learning the data in the training set, the performance of the model is evaluated using a validation set, and the hyperparameters of the model are adjusted to obtain an optimized image identification model, including:
[0029] S4.1: Use the random forest classifier as a modeling tool to extract meaningful imaging features and optimize its key parameters using grid search techniques, including the number of decision trees, maximum depth, maximum number of features, minimum sample splits, and minimum sample leaf nodes ( max_features , min_samples_split , min_samples_leaf );
[0030] S4.2: After determining the optimal parameter combination, we constructed the final random forest model based on the training set, calculated the radiomics score, and evaluated its performance on the test set.
[0031] Furthermore, in step S5, the corresponding radiomics score is calculated using the optimized image identification model, including:
[0032] According to the preset importance threshold, the optimized image identification model is used to output meaningful characteristic imaging features and calculate the imaging score of each case.
[0033] Furthermore, in step S6, a clinical feature model is constructed based on the clinical structured data to output risk clinical factors, including:
[0034] Construct clinical characteristic models based on clinical factors;
[0035] In the training set and validation set, risk factor analysis was performed using univariate and multivariate logistic methods, respectively;
[0036] Based on the construction of clinical feature model, risk clinical factors are output.
[0037] In one embodiment, in step S7, constructing a joint model based on the radiomics features, the corresponding radiomics scores, and the risk clinical factors includes:
[0038] Use the RandomForestClassifier module in Python's scikit-learn library to build a random forest model;
[0039] Using the combined data of clinical factors and radiomics scores, the random forest model is trained to construct a joint model;
[0040] The model was evaluated using the area under the receiver operating characteristic (ROC) curve (AUC), decision curve analysis (DCA), and calibration curves. The AUC was used to reflect the accuracy of the identification model. The decision curve analysis used the threshold probability as the horizontal axis and the net benefit as the vertical axis to measure the clinical value of the model by considering the net benefits of taking different actions at different threshold probabilities. The calibration curve was drawn with the predicted probability as the horizontal axis and the actual probability as the vertical axis to evaluate the accuracy and reliability of the model and to determine whether the model had overfitting or underfitting problems.
[0041] A nomogram was used to predict the likelihood of having immune-related pneumonia (CIP) based on key clinical and radiomic features.
[0042] In a second aspect, the present application further provides a differential diagnosis system for immune-related interstitial pneumonia based on a machine learning algorithm, which is applied to the differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm as described in the first aspect, the system comprising:
[0043] Data acquisition module: collects patients' clinical structured data and lung CT imaging data;
[0044] Data processing module: pre-processing the lung CT image using image processing technology to segment the effective lung area;
[0045] Data partitioning module: randomly divides patient data into training set and validation set;
[0046] Image data processing module: uses the random forest method to extract meaningful imaging features to construct an image identification model, trains the image identification model using a training set, adjusts its parameters by learning from the data in the training set, evaluates the model's performance using a validation set, and adjusts the model's hyperparameters to obtain an optimized image identification model;
[0047] Image data prediction module: calculates the corresponding radiomics score through the optimized image identification model;
[0048] Clinical data prediction module: builds a clinical feature model based on clinical structured data and outputs risk clinical factors;
[0049] Algorithm fusion module: constructing a joint model based on the corresponding radiomics score and the risk clinical factors;
[0050] Result output module: predicts and outputs the data of the patient to be differentially diagnosed through the joint model to obtain the patient's final differential diagnosis result.
[0051] In a third aspect, the present application further provides an electronic device, comprising:
[0052] processor;
[0053] a memory for storing processor-executable instructions;
[0054] Wherein, the processor is configured to implement the differential diagnosis method of immune-related interstitial pneumonia based on machine learning algorithm as described in the first aspect when executing the instructions.
[0055] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium comprising instructions, wherein the instructions instruct a device to execute the differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm as described in the first aspect.
[0056] This application provides a differential diagnosis method and system for immune-related interstitial pneumonia based on a machine learning algorithm. It can use the random forest method in machine learning to build a CT-based differential diagnosis model based on a larger sample size. In addition, it combines imaging genomics features and clinical parameters to establish a feature model that can distinguish immune-related pneumonia CIP from other types of pneumonia. At the same time, a non-invasive differential diagnosis model based on CT imaging is constructed to promote the rapid identification of the cause of severe pneumonia. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1A flow chart of a differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm provided in one embodiment of the present application.
[0058] Figure 2-5 An embodiment of the present application provides curves of various indicators of the radiomics training set and validation set.
[0059] Figure 6 A schematic diagram of a differential diagnosis system module for immune-related interstitial pneumonia based on a machine learning algorithm provided in one embodiment of the present application.
[0060] Figure 7 A schematic diagram of an electronic terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0062] It should be noted that, in the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art in the art to which this application relates. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0063] It should be noted that, in the embodiments of the present application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order. Features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0064] Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] This application provides a differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm, develops a non-invasive differential diagnosis method, and constructs a joint model combining imaging genomics features and clinical parameters to facilitate rapid identification of the cause of pneumonia.
[0066] Figure 1 This is a flow chart of a differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm provided in one embodiment of the present application. Figure 1 A differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm is shown, comprising at least the following steps:
[0067] S1: Collect the patient's clinical structured data and lung CT image data.
[0068] Specifically, in step S1, the patient's clinical structured data and lung CT image data are collected, including: collecting the patient's clinical structured data from the electronic medical record, downloading the DICOM format file of the patient's lung CT image, and resampling the image to an isotropic voxel size. The clinical structured data includes one or more of gender, age, tumor type, type of immunotherapy drug used, smoking history, radiotherapy history, and PDL1 expression level.
[0069] S2: Pre-processing the lung CT image using image processing technology to segment the effective lung area.
[0070] Specifically, in step S2, the lung CT image is preprocessed using image processing technology to segment the effective lung area, including:
[0071] S2.1: Manually identify the area with the most severe inflammation;
[0072] S2.2: Use 3Dslicer software to outline a cylindrical ROI region with a diameter of 20 mm and a height of 20 mm in the center of the region.
[0073] S2.3: For each ROI region, the histogram features and eight radiomics filter features are calculated, namely: HHH, HHL, HLH, LHH, LLH, LHL, HLL, LLL, where H represents a high-pass filter and L represents a low-pass filter;
[0074] S2.4: Perform Z-normalization on the radiomics filter features to reduce data variability;
[0075] S2.5: Use the PyRadiomics standardization method to extract imaging features from the normalized radiomics filter features, calculate consistency using the intraclass correlation coefficient (ICC), and retain features with an ICC greater than 0.75;
[0076] S2.6: Use the random forest classifier combined with the SelectFromModel method to select key features based on the feature importance threshold;
[0077] S2.7: Integrate and save the filtered features, target variables, and identifiers.
[0078] S3: Randomly divide the patient data into training and validation sets.
[0079] Specifically, in step S3, the patient data is randomly divided into a training set and a validation set, including:
[0080] The random module in the Python standard library was used to generate random numbers and perform random selection, and the integrated and stored patient data were divided into a training set and a validation set, where the ratio of the training set to the validation set was 7:3.
[0081] S4: Use the random forest method to extract meaningful imaging features to construct an image identification model, train the image identification model using the training set, adjust its parameters by learning the data in the training set, evaluate the performance of the model using the validation set, and adjust the model's hyperparameters to obtain an optimized image identification model.
[0082] Specifically, in step S4, a random forest method is used to extract meaningful imaging features to construct an image identification model, the image identification model is trained using a training set, its parameters are adjusted by learning the data in the training set, the performance of the model is evaluated using a validation set, and the hyperparameters of the model are adjusted to obtain an optimized image identification model, including:
[0083] S4.1: Use the random forest classifier as a modeling tool to extract meaningful imaging features and optimize its key parameters using grid search techniques, including the number of decision trees, maximum depth, maximum number of features, minimum sample splits, and minimum sample leaf nodes ( max_features , min_samples_split , min_samples_leaf );
[0084] S4.2: After determining the optimal parameter combination, we constructed the final random forest model based on the training set, calculated the radiomics score, and evaluated its performance on the test set.
[0085] S5: Calculate the corresponding radiomics score using the optimized image identification model.
[0086] Specifically, in step S5, the corresponding radiomics score is calculated using the optimized image identification model, including:
[0087] According to the preset importance threshold, the optimized image identification model is used to output meaningful characteristic imaging features and calculate the imaging score of each case.
[0088] S6: Build a clinical feature model based on clinical structured data and output risk clinical factors.
[0089] Specifically, in step S6, a clinical feature model is constructed based on clinical structured data to output risk clinical factors, including:
[0090] Construct clinical characteristic models based on clinical factors;
[0091] In the training set and validation set, risk factor analysis was performed using univariate and multivariate logistic methods, respectively;
[0092] Based on the construction of clinical feature model, risk clinical factors are output.
[0093] S7: Construct a joint model based on the radiomics features, the corresponding radiomics scores and the risk clinical factors.
[0094] Specifically, in step S7, a joint model is constructed based on the radiomics features, the corresponding radiomics scores, and the risk clinical factors, including:
[0095] Use the RandomForestClassifier module in Python's scikit-learn library to build a random forest model;
[0096] Using the combined data of clinical factors and radiomics scores, the random forest model is trained to construct a joint model;
[0097] Specifically, the model was evaluated using the area under the receiver operating characteristic (ROC) curve (AUC), decision curve analysis (DCA), and calibration curve. AUC was used to reflect the accuracy of the identification model. Decision curve analysis used the threshold probability as the horizontal axis and the net benefit as the vertical axis to measure the clinical value of the model by considering the net benefits of taking different actions at different threshold probabilities. A calibration curve was drawn with the predicted probability as the horizontal axis and the actual probability as the vertical axis to evaluate the accuracy and reliability of the model and to determine whether the model had overfitting or underfitting problems.
[0098] Specifically, a nomogram was used to predict the likelihood of having immune-related pneumonia (CIP) based on important clinical and radiomic features.
[0099] S8: The combined model is used to predict and output the data of the patient to be differentially diagnosed, thereby obtaining the patient's final differential diagnosis result.
[0100] Specifically, in this embodiment, patients with immune-related pneumonia CIP and tumor patients who developed other pneumonia (including bacterial / fungal / viral infectious pneumonia and obstructive pneumonia, radiation pneumonia) after using ICI were included. The patient's clinical data, including gender, age, tumor type, type of immunotherapy drug used, smoking history, radiotherapy history, PDL1 expression, etc., were collected from electronic medical records. The random module in the Python (Python Software Foundation, 3.13.0) standard library was used to generate random numbers and randomly select patients to divide into training and validation sets (7:3). The identification model was constructed in the training data set, and the model was evaluated in the validation set. The DICOM format file of the CT image was downloaded and the image was resampled to an isotropic voxel size.
[0101] Specifically, a pulmonologist with more than 10 years of experience identified the area of most severe inflammation. A radiologist and a pulmonologist then delineated a cylindrical region of interest (ROI) with a diameter of 20 mm and a height of 20 mm at the center of the region using 3D Slicer (version 4.11.2, www.slicer.org). For each ROI, histogram features and eight filter features (HHH, HHL, HLH, LHH, LLH, LHL, HLL, and LLL) were calculated. All radiomic features were Z-normalized to reduce data variability. Radiomic features were extracted from the ROIs drawn by the two physicians using the standardized method using the open-source software PyRadiomics (v.3.0.1). Consistency was calculated using the intraclass correlation coefficient (ICC), and features with an ICC greater than 0.75 were retained. Then, we use the random forest classifier combined with the SelectFromModel method to filter key features based on the feature importance threshold (0.01). Then, we integrate and save the filtered features, target variables, and identifiers.
[0102] Specifically, in this embodiment, the test set is feature extracted using the same method, and then the features consistent with the training set are screened out and saved. The model is constructed using the random forest method. In short, the Random Forest Classifier is used as a modeling tool to extract meaningful imaging features, and its key parameters are optimized by grid search technology, including the number of decision trees, maximum depth, maximum number of features, minimum sample splitting and minimum sample leaf nodes (n_estimators, max_depth, max_features, min_samples_split, min_samples_leaf). After determining the optimal parameter combination, the final random forest model is constructed based on the training set, the imaging omics score is calculated, and its performance is evaluated on the test set.
[0103] Subsequently, 12 clinical factors potentially related to immunotherapy and pneumonia were subjected to univariate and multivariate logistic regression analysis to screen out risk factors that were significantly correlated with immune-related pneumonia (CIP). These factors were then combined with imaging genomics features to construct a new clinical differential diagnosis model to predict the occurrence of immune-related pneumonia (CIP). In this embodiment, the RandomForestClassifier module in the scikit-learn library of Python was used to construct a random forest model to solve the classification problem. The model was evaluated using the area under the receiver operating characteristic curve (ROC) AUC, decision curve analysis (DCA) and calibration curve. AUC is used to reflect the accuracy of the identification model.
[0104] Specifically, in this embodiment, the decision curve analysis uses the threshold probability as the horizontal axis and the net benefit as the vertical axis to measure the clinical value of the model by considering the net benefits of taking different actions ("Treat All" and "Treat None") under different threshold probabilities. A calibration curve is drawn with the predicted probability as the horizontal axis and the actual probability of occurrence as the vertical axis to evaluate the accuracy and reliability of the model and to determine whether the model has overfitting or underfitting problems. In order to enhance the clinical practice usability of the prediction model, a nomogram was also developed to predict the possibility of having immune-related pneumonia CIP based on important clinical and radiomic features. All analyses were performed in R v.4.2.2 (R Foundation for Statistical Computing, 4.2.2).
[0105] Specifically, in this embodiment, a total of 238 patients who developed pneumonia after ICI treatment were included, including 116 patients with immune-related pneumonia CIP and 122 patients who developed other pneumonia after using ICI (92 patients with bacterial / fungal / viral infectious pneumonia and obstructive pneumonia, and 30 patients with radiation pneumonia). The training set contained 166 patients and the validation set contained 72 patients. After random assignment, there was no statistically significant difference in the clinical characteristics of the two groups of patients (p>0.05), ensuring the balance and comparability of the data sets. Further analysis showed that in the training set, there were 84 patients (50.6%) with immune-related pneumonia CIP and 82 patients (49.4%) with OTP; in the validation set, there were 32 patients (44.4%) with immune-related pneumonia CIP and 40 patients (55.6%) with OTP. There was no statistical difference in the proportion of immune-related pneumonia CIP and OTP in the two data sets (p=0.383), indicating that the training set and validation set also achieved a balance in the distribution of various types of pneumonia.
[0106] Specifically, in this example, the imaging features extracted using the random forest method were screened with an ICC > 0.75, ultimately retaining 1,103 reliable imaging features. A random forest classifier was then used for feature selection, constructing multiple decision trees to avoid the risk of overfitting, and retaining features with an importance score above 0.1 (a threshold was set using the threshold parameter, 0.1, so only features with an importance score above 0.1 were retained). After dimensionality reduction using the random forest method mentioned above, 11 meaningful features were extracted (p<0.05): original_glcm_Autocorrelation, gradient_glcm_Contrast, gradient_glszm_SmallAreaEmphasis, wavelet-HLL_firstorder_TotalEnergy, wavelet-HLL_glcm_SumSquares, wavelet-HLL_gldm_GrayLevelNonUniformity, wavelet-HLL_glszm_ZonePercentage, wavelet-HLH_glrlm_GrayLevelNonUniformityNormalized, wavelet-HHL_gldm_SmallDependenceHighGrayLevelEmphasis, wavelet-HHL_glrlm_LowGrayLevelRunEmphasis, wavelet-HHH_glcm_MaximumProbability. The random forest method was then used to build a model with the above 11 imaging features to calculate the imaging omics score for each case.
[0107] Specifically, in this embodiment, univariate and multivariate logistic methods were used to analyze risk factors in the training set and validation set, respectively. Univariate analysis showed that there were significant differences between the two groups in smoking history (p = 0.001), radiotherapy history (p < 0.001), and radiomics score (p < 0.001). The remaining clinical factors were not statistically significant. After further multivariate analysis, smoking history (p = 0.011), radiotherapy history (p = 0.002), and radiomics score (p < 0.001) were all independent risk factors for the occurrence of immune-related pneumonia CIP. These three clinical factors were used to construct a clinical characteristic model, and these three clinical factors were combined with radiomics scores to construct a new combination model.
[0108] like Figure 2As shown, the area under the ROC curve (AUC) of the imaging omics training set reached 0.833 (95% CI: 0.771-0.895), and the AUC of the validation set was 0.821 (95% CI: 0.725-0.916), which shows that the model can effectively differentiate and diagnose immune-related pneumonia CIP from other types of pneumonia. Further analysis found that the model constructed by combining clinical characteristics and imaging features had an AUC of 0.872 (95% CI: 0.819-0.924), and its AUC area was greater than that of the traditional clinical model (AUC = 0.692, 95% CI: 0.617-0.767). This result was also verified in the validation set (combined model AUC = 0.860, 95% CI: 0.775-0.945; traditional model AUC = 0.739, 95% CI: 0.630-0.847) ( Figure 3 Similarly, calibration curve analysis showed that the combined model of clinical and imaging features exhibited good calibration performance across the entire range of prediction probabilities ( Figure 4 ). In addition, the decision curve analysis shows that ( Figure 5 ), the combined model provided higher net benefits across all threshold probability ranges compared to the individual clinical models, resulting in more accurate differential diagnosis. Figure 6 was the nomogram of the combined model, presenting the probability estimation for a sample patient. Its C index was 0.8715 (95% C: 0.8190084, 0.9240229), confirming the high accuracy of the combined model in differential diagnosis.
[0109] Specifically, in this embodiment, the present invention is the first to use a machine learning random forest method to construct an imaging genomics model for differential diagnosis of immune-related pneumonia CIP and RRP and other pneumonia. There are significant differences in treatment strategies between immune-related pneumonia CIP and other types of pneumonia (especially infectious pneumonia). Once a patient with immune-related pneumonia CIP is diagnosed, steroid hormone treatment should be started immediately. For 18.5% of them, steroid-refractory immune-related pneumonia CIP 22 Patients with severe pneumonia may also need to take immunosuppressants or anti-fibrosis drugs, and high-grade immune-related pneumonia (CIP) may require discontinuation of ICIs. Therefore, accurately identifying the type of pneumonia a patient suffers from after ICI treatment is crucial for developing effective treatment plans and improving patient prognosis. The results of this invention have important potential value in guiding treatment strategies for pneumonia that occurs after immunotherapy and in timely adjusting tumor treatment plans.
[0110] Figure 6 This is a schematic diagram of a differential diagnosis system module for immune-related interstitial pneumonia based on a machine learning algorithm provided in an embodiment of the present application, which is applied to Figure 1 The system modules specifically include: data acquisition module 11, data processing module 12, data partitioning module 13, image data processing module 14, image data prediction module 15, clinical data prediction module 16, algorithm fusion module 17, and result output module 18. Figure 1 The parts shown in FIG are the same or similar and are not described again here.
[0111] In the embodiment of the present application, the data acquisition module 11 is used to collect the patient's clinical structured data and lung CT image data. Figure 1 And the corresponding description thereof, this application will not repeat them here.
[0112] In the embodiment of the present application, the data processing module 12 is used to pre-process the lung CT image using image processing technology to segment the effective lung area. Figure 1 And the corresponding description thereof, this application will not repeat them here.
[0113] In the embodiment of the present application, the data partitioning module 13 is used to randomly divide the patient data into a training set and a validation set. Figure 1 And the corresponding description thereof, this application will not repeat them here.
[0114] In the embodiment of the present application, the image data processing module 14 is used to extract meaningful imaging features using the random forest method to construct an image identification model, train the image identification model using a training set, adjust its parameters by learning the data in the training set, evaluate the performance of the model using a validation set, and adjust the hyperparameters of the model to obtain an optimized image identification model. For details, please refer to Figure 1 And the corresponding description thereof, this application will not repeat them here.
[0115] In the embodiment of the present application, the image data prediction module 15 is used to calculate the corresponding radiomics score through the optimized image identification model. Figure 1 And the corresponding description thereof, this application will not repeat them here.
[0116] In the embodiment of the present application, the clinical data prediction module 16 is used to build a clinical feature model based on clinical structured data and output dangerous clinical factors. Figure 1 And the corresponding description thereof, this application will not repeat them here.
[0117] In the embodiment of the present application, the algorithm fusion module 17 is used to construct a joint model based on the radiomics features, the corresponding radiomics scores and the risk clinical factors. Figure 1 And the corresponding description thereof, this application will not repeat them here.
[0118] In the embodiment of the present application, the result output module 18 is used to predict and output the data of the patient to be differentially diagnosed through the joint model to obtain the patient's final differential diagnosis result. Figure 1 And the corresponding description thereof, this application will not repeat them here.
[0119] See also Figure 7 , Figure 7 This is an electronic terminal device provided by an embodiment of the present application. Figure 7 The electronic terminal device shown includes at least the following parts: one or more processors, one or more input devices, one or more output devices, and one or more memories. The processors, input devices, output devices, and memories communicate with each other via a communication bus. The memory is used to store computer programs, which include program instructions. The processor is used to execute the program instructions stored in the memory. The processor is configured to call the program instructions to perform the following operations to perform the functions of the modules / units in the above-mentioned device embodiments, such as Figure 6 Functionality of the modules shown.
[0120] In an embodiment of the present application, a computer-readable storage medium includes instructions, and the instructions instruct a device to execute the method of the first aspect. For example, the instructions instruct the device to execute Figure 1 The steps in the figure show a differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm.
[0121] It should be understood that in the embodiment of the present invention, the so-called processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. It should be noted that a part of the electronic device of the above embodiment may also be implemented by a computer. In this case, the program for implementing the control function may be recorded in a computer-readable recording medium, and the program recorded in the recording medium may be read into a computer and executed.
[0122] Input devices may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc. Output devices may include a display (LCD, etc.), a speaker, etc.
[0123] It should be noted that the "computer" mentioned here refers to a computer built into an electronic device, employing hardware including an operating system (OS) and peripheral devices. Furthermore, "computer-readable recording medium" refers to removable media such as floppy disks, magneto-optical disks, ROMs, and CD-ROMs, as well as storage devices such as hard disks built into computers.
[0124] Furthermore, "computer-readable recording media" may include: media that dynamically store programs for a short period of time, such as communication lines when transmitting programs via networks such as the Internet or communication lines such as telephone lines; and media that store programs for a fixed period of time, such as volatile memory within computers acting as servers or clients in this context. Furthermore, the aforementioned program may be a program for implementing a portion of the aforementioned functions, or a program that can achieve the aforementioned functions by combining with a program already stored in a computer.
[0125] Furthermore, the electronic device in the above-described embodiments can also be implemented as a collection (device group) consisting of multiple devices. Each device constituting the device group may have a portion or all of the functions or functional blocks of the electronic device in the above-described embodiments. A device group only needs to have all the functions or functional blocks of the electronic device.
[0126] It is understood that the machine learning-based differential diagnosis system, method, electronic device, and storage medium for immune-related interstitial pneumonia provided in the embodiments of this application can effectively improve the prediction ability of pneumonia, solving the problems of traditional manual examinations that are unable to be performed in real time and the inaccuracy of imaging omics combined with machine learning. Through the application of this system, immune-related pneumonia (CIP) can be quickly distinguished from other types of pneumonia, reducing trauma and further enhancing the prediction ability of different types of pneumonia.
[0127] Those skilled in the art should recognize that the above embodiments are merely intended to illustrate the present application and are not intended to limit the present application. As long as they are within the spirit of the present application, appropriate changes and modifications to the above embodiments are within the scope of protection claimed in the present application.
Claims
1. A differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm, characterized in that: The method comprises the following steps: S1: Collect the patient's clinical structured data and lung CT imaging data; S2: preprocessing the lung CT image using image processing technology to segment the effective lung area; S 3: Randomly divide the patient data into training set and validation set; S 4: extracting meaningful imaging features using a random forest method to construct an image identification model, training the image identification model using a training set, adjusting its parameters by learning the data in the training set, evaluating the performance of the model using a validation set, and adjusting the hyperparameters of the model to obtain an optimized image identification model; S 5: Calculating the corresponding radiomics score through the optimized image identification model; S 6: Build a clinical feature model based on clinical structured data and output risk clinical factors; S 7: constructing a joint model according to the corresponding radiomics score and the risk clinical factors; S 8: The combined model is used to predict and output the data of the patient to be differentially diagnosed, thereby obtaining a final differential diagnosis result for the patient.
2. The differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm according to claim 1, characterized in that: In step S1, the clinical structured data and lung CT image data of the patient are collected, including: The patient's clinical structured data is collected from the electronic medical record, the DIC OM format file of the patient's lung CT image is downloaded, and the image is resampled to an isotropic voxel size, wherein the clinical structured data includes one or more of gender, age, tumor type, type of immunotherapy drug used, smoking history, radiotherapy history, and PDL 1 expression.
3. The differential diagnosis method for immune-related interstitial pneumonia based on machine learning algorithm according to claim 2, characterized in that: In step S2, the lung CT image is preprocessed using image processing technology to segment the effective lung area, including: S2.1: Manually determine the area with the most severe inflammation; S2.2: Use 3D slicer software to outline a cylindrical r oi region with a diameter of 20 mm and a height of 20 mm in the center of the region; S2.3: For each r oi region, the histogram features and eight radiomics filter features are calculated, which are: HHH, HHL, HLH, LHH, LLH, LHL, HLL, LLL, where H represents a high-pass filter and L represents a low-pass filter; S2.4: Perform Z-normalization on the radiomics filter features to reduce data variability; S2.5: Using the PyRadiomic standardization method, the normalized radiomics filter features are respectively subjected to imaging feature extraction, and the consistency is calculated using the intraclass correlation coefficient ICC, and the features with ICC greater than 0.75 are retained; S2.6: Use the random forest classifier combined with the Select Frame Model method to screen key features based on the feature importance threshold; S2.7: Integrate and save the screened features, target variables, and identifiers.
4. The differential diagnosis method for immune-related interstitial pneumonia based on machine learning algorithm according to claim 3, characterized in that: In step S3, the patient data is randomly divided into a training set and a validation set, including: The random module in the Python standard library was used to generate random numbers and perform random selection, and the integrated and saved patient data were divided into a training set and a validation set, where the ratio of the training set to the validation set was 7:
3.
5. The differential diagnosis method for immune-related interstitial pneumonia based on machine learning algorithm according to claim 4, characterized in that: In the step S4, a random forest method is used to extract meaningful imaging features to construct an image identification model, the image identification model is trained using a training set, its parameters are adjusted by learning the data in the training set, the performance of the model is evaluated using a validation set, and the hyperparameters of the model are adjusted to obtain an optimized image identification model, including: S 4.1: Use random forest classifier as a modeling tool to extract meaningful imaging features, extract meaningful imaging features, and optimize its key parameters through grid search technology, including the number of decision trees, maximum depth, maximum number of features, minimum sample splits and minimum sample leaf nodes, max_features, min_samples_split, min_samples_leave; S 4.2: After determining the optimal parameter combination, we built the final random forest model based on the training set, calculated the radiomics score, and evaluated its performance on the test set.
6. The differential diagnosis method for immune-related interstitial pneumonia based on machine learning algorithm according to claim 5, characterized in that: In step S5, the corresponding radiomics score is calculated by using the optimized image identification model, including: According to the preset importance threshold, the optimized image identification model is used to output meaningful characteristic imaging features and calculate the imaging score of each case.
7. The differential diagnosis method for immune-related interstitial pneumonia based on machine learning algorithm according to claim 6, characterized in that: In step S6, a clinical characteristic model is constructed based on clinical structured data to output risk clinical factors, including: Construct clinical characteristics model based on clinical factors; In the training set and validation set, risk factor analysis was performed using univariate and multivariate logistic methods, respectively; Based on the construction of clinical feature model, risk clinical factors are output.
8. The differential diagnosis method for immune-related interstitial pneumonia based on machine learning algorithm according to claim 7, characterized in that: In step S7, a joint model is constructed according to the corresponding radiomics score and the risk clinical factor, including: Use the RandomForestClassifier module in Python's scikit-learn library to build a random forest model; Using the combined data of clinical factors and radiomics scores, the random forest model is trained to construct a joint model; The model was evaluated using the area under the receiver operating characteristic curve (ROC), decision curve analysis (DCA), and calibration curve. AUC was used to reflect the accuracy of the identification model. The decision curve analysis used the threshold probability as the horizontal axis and the net benefit as the vertical axis. The clinical value of the model was measured by considering the net benefits of taking different actions under different threshold probabilities. The calibration curve was drawn with the predicted probability as the horizontal axis and the actual probability of occurrence as the vertical axis to evaluate the accuracy and reliability of the model and to determine whether the model had overfitting or underfitting problems. A nomogram was used to predict the likelihood of having immune-related pneumonia (CIP) based on important clinical and radiomic features.
9. A differential diagnosis system for immune-related interstitial pneumonia based on a machine learning algorithm, applied to the differential diagnosis method for immune-related interstitial pneumonia based on a machine learning algorithm as claimed in any one of claims 1 to 8, characterized in that: The system comprises: Data acquisition module: collects the patient's clinical structured data and lung CT image data; Data processing module: pre-processing the lung CT image using image processing technology to segment the effective lung area; Data partitioning module: randomly divides patient data into training set and validation set; Image data processing module: using the random forest method to extract meaningful imaging features to construct an image identification model, using the training set to train the image identification model, adjusting its parameters by learning the data in the training set, using the validation set to evaluate the performance of the model, and adjusting the model's hyperparameters to obtain an optimized image identification model; Image data prediction module: calculating the corresponding radiomics score through the optimized image identification model; Clinical data prediction module: builds a clinical feature model based on clinical structured data and outputs risk clinical factors; Algorithm fusion module: constructing a joint model according to the corresponding radiomics score and the risk clinical factors; Result output module: predicts and outputs the data of the patient to be differentially diagnosed through the joint model to obtain the patient's final differential diagnosis result.
10. A computer-readable storage medium, characterized in that: The method comprises instructions for instructing the device to execute the differential diagnosis method of immune-related interstitial pneumonia based on a machine learning algorithm as described in any one of claims 1 to 8.