Gbdts-based pneumocystis jirovecii pneumonia diagnosis method

CN122531684APending Publication Date: 2026-08-07NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING UNIV OF POSTS & TELECOMM
Filing Date
2026-05-11
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]针对现有耶氏肺孢子菌肺炎诊断方法检出率低、主观性强、周期长、特异性不足的问题,本发明提出了基于GBDT的耶氏肺孢子菌肺炎诊断方法,通过融合多维度特异性临床指标,利用GBDT算法构建诊断模型,实现耶氏肺孢子菌肺炎的客观化、精准化、快速辅助诊断,为临床诊疗提供可靠依据

Benefits of technology

[0033]本发明通过临床特征、实验室特征和影像学特征三大维度的专属特征集,覆盖了PCP从易感人群筛查、病原学确诊依据、特异性血清学标志物到影像学典型表现的全链条诊断要素,而非通用肺炎的泛化特征。从模型输入层实现了对PCP疾病的专属适配,从根源上解决了现有模型对PCP诊断特异性不足、鉴别诊断能力弱的问题,大幅提升了模型对PCP早期、不典型病例的识别能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122531684A_ABST
    Figure CN122531684A_ABST
Patent Text Reader

Abstract

The application provides a Pneumocystis jirovecii pneumonia diagnosis method based on GBDT, and comprises the following steps: collecting Pneumocystis jirovecii pneumonia patient case data diagnosed clinically, non-Pneumocystis jirovecii pneumonia lung infection patient case data and healthy person control data, and forming an original data set; cleaning and optimizing the original data set; building a gradient boosting decision tree model, training and optimizing the original data set, and obtaining a trained Pneumocystis jirovecii pneumonia diagnosis model; obtaining characteristic indexes of a to-be-diagnosed object, and generating a standardized to-be-tested sample; inputting the standardized to-be-tested sample into the trained Pneumocystis jirovecii pneumonia diagnosis model, and outputting a probability value of the to-be-diagnosed object being a Pneumocystis jirovecii pneumonia patient from the model; and determining a Pneumocystis jirovecii pneumonia diagnosis result. The application realizes objective, accurate and rapid auxiliary diagnosis of Pneumocystis jirovecii pneumonia by fusing multi-dimensional specific clinical indexes and using a GBDT algorithm to build a diagnosis model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical diagnosis and artificial intelligence, specifically to a diagnostic method for Pneumocystis jirovecii pneumonia based on GBDT. Background Technology

[0002] Pneumocystis pneumonia (PCP) is an interstitial pneumonia caused by Pneumocystis infection. It is more common in immunocompromised or compromised individuals, such as HIV patients, organ transplant recipients, and those on long-term glucocorticoid or immunosuppressant therapy. The disease is characterized by fever, dry cough, and progressive dyspnea. It progresses rapidly, and the mortality rate is extremely high if not diagnosed and treated promptly, especially in immunocompromised individuals where the mortality rate can reach 100%. Early and accurate diagnosis is crucial for improving patient prognosis.

[0003] Currently, the diagnosis of Pneumocystis jirovecii pneumonia mainly relies on a comprehensive assessment of etiological examination, serological examination, imaging examination, and clinical symptoms. Among these, etiological examination (such as sputum smears and bronchoalveolar lavage fluid staining microscopy) is the gold standard for diagnosis, but it has drawbacks such as low detection rate (the detection rate of routine sputum smears is only 6%~30%), invasiveness (bronchoalveolar lavage and lung biopsy), and long testing cycle. Although serological examination (such as lactate dehydrogenase and 1,3-β-D-glucan detection) and imaging examination (ground-glass opacities on chest CT) are non-invasive methods, they lack specificity and are easily confused with pneumonia caused by other bacteria, viruses, and fungi. They are highly dependent on the clinical experience of doctors and have significant subjective biases, making diagnosis extremely difficult in primary healthcare institutions.

[0004] Machine learning algorithms, with their ability to mine nonlinear data and their advantages in objective analysis, have been widely used in the field of medical auxiliary diagnosis. Gradient boosting decision tree (GBDT), as an ensemble learning algorithm, iteratively trains multiple weak decision trees and accumulates the results, exhibiting strong robustness, low dependence on features, and the ability to capture complex data relationships. While there are existing cases of machine learning algorithms being applied to the diagnosis of pneumonia-related diseases, a specific GBDT diagnostic model for Pneumocystis pneumonia has not yet been reported. Furthermore, existing models often rely solely on routine blood test data and do not integrate specific indicators for PCP diagnosis, resulting in insufficient diagnostic accuracy and specificity. Summary of the Invention

[0005] To address the problems of low detection rate, high subjectivity, long processing time, and insufficient specificity in existing diagnostic methods for *Pneumocystis jirovecii* pneumonia, this invention proposes a GBDT-based diagnostic method for *Pneumocystis jirovecii* pneumonia. By integrating multi-dimensional specific clinical indicators and utilizing the GBDT algorithm to construct a diagnostic model, this method achieves objective, accurate, and rapid auxiliary diagnosis of *Pneumocystis jirovecii* pneumonia, providing a reliable basis for clinical diagnosis and treatment. The technical solution provided by this invention is as follows:

[0006] Firstly, the GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia includes the following steps:

[0007] Step 1: Collect case data of clinically diagnosed Pneumocystis pneumonia patients, case data of lung infections without Pneumocystis pneumonia, and control data of healthy individuals to form the original dataset; the case data includes clinical characteristics, laboratory characteristics, and imaging characteristics;

[0008] Step 2: Clean and optimize the original dataset;

[0009] Step 3: Construct a gradient boosting decision tree model, train and optimize it using the original dataset, and obtain a trained diagnostic model for Pneumocystis jirovecii pneumonia.

[0010] Step 4: Obtain the characteristic indicators of the object to be diagnosed, and clean and optimize them according to Step 2 to generate standardized test samples;

[0011] Step 5: Input the standardized test sample into the trained Pneumocystis jirovecii pneumonia diagnostic model. The model outputs the probability value that the subject to be diagnosed is a patient with Pneumocystis jirovecii pneumonia.

[0012] Step 6: If the result is positive for Pneumocystis jirovecii pneumonia, it is considered a suspected or confirmed case; if the result is negative, it is considered that there is no significant possibility of disease. At the same time, the importance ranking of each feature is output to provide a reference for clinical diagnosis.

[0013] Preferably, the case data specifically includes:

[0014] Clinical features: age, sex, type of immunodeficiency, duration of symptoms, degree of fever, and grade of dyspnea;

[0015] Laboratory characteristics: hexamine silver staining results, Pneumocystis jirovecii DNA, 1,3-β-D-glucan content, Δ lactate dehydrogenase, procalcitonin, CD4+ T cell count, CD4+ T cell percentage, C-reactive protein, and complete blood count indicators;

[0016] Imaging features: distribution of ground-glass opacities on chest CT, presence of consolidation, and cyst formation.

[0017] Preferably, step 2 specifically includes:

[0018] Step 2-1: Remove samples with more than 20% missing values, and fill the remaining missing values ​​with the median or mode of the corresponding feature; identify and remove outliers using the 3σ criterion or box plot method.

[0019] Step 2-2, Feature Encoding and Normalization: Categorical features are converted into numerical features using one-hot encoding or label encoding; continuous features are standardized using Z-score.

[0020] Steps 2-3: The preprocessed dataset is randomly divided into training set, test set and validation set in a ratio of 7:2:1. The proportions of patients with Pneumocystis jirovecii pneumonia, non-pneumonia patients and healthy people are consistent in the three sets of datasets.

[0021] Preferably, step 3 specifically includes the following steps:

[0022] Step 3-1: Initialize the model and set the basic hyperparameter range;

[0023] Step 3-2, Initialize the strong learner The CART regression tree is trained round by round for a total of M rounds to obtain the weak learner for each round. The final strong learner is obtained by weighting and summing all the weak learners. ;

[0024] Step 3-3: Retrain the model using the optimal hyperparameter combination to obtain the final diagnostic model for Pneumocystis jirovecii pneumonia.

[0025] Preferably, the specific process of training the CART regression tree round by round is as follows: For the m-th round, m=1,2,...,M, perform the following operations:

[0026] For each sample i, compute the previous model. loss function for The negative gradient is used as the pseudo residual for this round. ;

[0027] Using the features of all current samples as input, and pseudo residuals Using the output labels, train a CART regression tree to obtain the m-th weak learner. ;

[0028] The weighted prediction result of the m-th tree is added to the overall strong learner to obtain the model after this iteration:

[0029]

[0030] in, The weights are for the weak learner.

[0031] Secondly, the GBDT-based diagnostic device for Pneumocystis jirovecii pneumonia includes a data acquisition module, a data preprocessing module, a feature engineering module, a model calculation module, and a result output module connected in sequence. The model calculation module stores the model constructed by the GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia as described in any one of claims 1-5.

[0032] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0033] This invention utilizes a proprietary feature set across three dimensions—clinical features, laboratory features, and imaging features—to cover the entire diagnostic chain of PCP, from susceptible population screening, etiological diagnostic criteria, specific serological markers to typical imaging manifestations, rather than the generalized features of common pneumonia. It achieves a PCP-specific adaptation at the model input layer, fundamentally solving the problems of insufficient diagnostic specificity and weak differential diagnostic ability for PCP in existing models, and significantly improving the model's ability to identify early and atypical cases of PCP.

[0034] The input features of the model in this invention are all routine tests accessible to primary healthcare institutions (complete blood count, biochemistry, routine chest CT, basic serological tests). It does not rely on invasive procedures such as bronchoalveolar lavage or lung biopsy, nor does it require high-end sequencing equipment. High-precision diagnosis can be achieved using only non-invasive, routine test data. Simultaneously, the model's diagnostic process is automated, providing real-time results without the need for complex manual analysis. This invention can be directly deployed in primary healthcare information systems and clinical diagnostic equipment, and is particularly suitable for primary healthcare institutions and physicians with limited experience. It enables early screening and rapid assisted diagnosis of PCP, filling the technological gap in PCP diagnosis at the primary level. Attached Figure Description

[0035] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0036] Figure 1 This is a flowchart of the data preprocessing process of the present invention;

[0037] Figure 2 This is the core model architecture diagram of the present invention;

[0038] Figure 3 This is a graph showing the change in training accuracy of the present invention. Detailed Implementation

[0039] 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.

[0040] To make the above-mentioned objectives, features and effects of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] Example 1: Please refer to Figures 1 to 3 The GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia includes the following steps:

[0042] Step 1, Multi-dimensional Dataset Construction: Collect case data of clinically diagnosed Pneumocystis pneumonia patients, case data of lung infections without Pneumocystis pneumonia, and control data of healthy individuals to form the original dataset; the case data includes multi-dimensional feature indicators, specifically divided into:

[0043] Clinical features: age, sex, type of immunodeficiency, duration of symptoms, degree of fever, and grade of dyspnea;

[0044] Laboratory characteristics: hexamine silver staining results, Pneumocystis jirovecii DNA, 1,3-β-D-glucan content, Δ lactate dehydrogenase, procalcitonin, CD4+ T cell count, CD4+ T cell percentage, C-reactive protein (high sensitivity), and routine blood tests.

[0045] Imaging features: distribution of ground-glass opacities on chest CT (bilateral / unilateral, perihilar / subpleural), presence of consolidation, and cystic formation.

[0046] Step 2, Data Preprocessing: Clean and optimize the original dataset. The specific steps are as follows.

[0047] Step 2-1, Data review and cleaning: Remove samples with more than 20% missing values, and fill the remaining missing values ​​with the median (continuous indicator) or mode (categorical indicator) of the corresponding feature; remove outliers (identified by the 3σ criterion or box plot method).

[0048] Step 2-2, Feature Encoding and Normalization: Categorical features (such as gender, presence or absence of symptoms, and imaging features) are converted into numerical features using one-hot encoding or label encoding; continuous features are standardized using Z-score. ), to eliminate the influence of dimensions.

[0049] Steps 2-3: Dataset splitting: The preprocessed dataset is randomly divided into training, testing, and validation sets in a ratio of 7:2:1 to ensure that the proportions of patients with Pneumocystis jirovecii pneumonia, non-pneumonia patients, and healthy individuals are consistent across the three sets of data, thus avoiding data bias.

[0050] Step 3, GBDT model training and optimization:

[0051] Step 3-1: Initialize the GBDT model and set the basic hyperparameter ranges as follows: learning rate 0.01~0.5, maximum depth 3~12, maximum number of features 0.3~1.0, minimum number of samples per leaf node 5~20, minimum number of samples per node 2~10, number of base learners 50~200, and downsampling ratio 0.7~0.95.

[0052] Step 3-2, the core of GBDT is gradient boosting, which means that in each round, a CART regression tree is trained, and this tree is used to fit the negative gradient of the loss function of the previous round. Then, the prediction result of this tree is added to the overall model with a certain weight (learning rate), and this process is repeated until the preset number of weak learners is reached or the loss function converges. Assuming that a strong learner F(x) is to be trained, a total of M rounds (corresponding to M weak learners) are required, the specific steps are as follows.

[0053] Step 3-2-1, Initialize the strong learner (base model): The initial model of GBDT is a very simple constant model that directly predicts the optimal constant of all samples (which minimizes the loss function). For most loss functions (such as squared loss), this optimal constant is the mean of the training set labels.

[0054] Step 3-2-2: Train the CART regression tree round by round. For the m-th round (m=1,2,...,M), perform the following operations:

[0055] Calculate the negative gradient (the generalized form of the residual). For each sample i, calculate the previous model... loss function for The negative gradient is used as the pseudo residual for this round, which is the target value that the model needs to fit in this round.

[0056]

[0057] Fit a CART regression tree, using the features X of all current samples as input and pseudo residuals as input. Using the output labels, train a CART regression tree to obtain the m-th weak learner. The output of this tree is a continuous numerical value, corresponding to the error correction amount.

[0058] Determine the weights (learning rate) of the weak learner. To prevent excessively large adjustments to a single tree (leading to overfitting), a learning rate (denoted as ) is introduced. The weights are used as a shrinkage factor to weight the prediction results of the m-th tree. Simultaneously, the optimal weights can be found through line search. This minimizes the loss function:

[0059]

[0060] Update the strong learner. Add the weighted prediction result of the m-th tree to the overall strong learner to obtain the model after this iteration:

[0061]

[0062] Step 3-2-3 yields the final model. After M iterations, the final strong learner is the weighted sum of all weak learners:

[0063]

[0064] Step 3-3: Retrain the model using the optimal hyperparameter combination to obtain the final diagnostic model for Pneumocystis jirovecii pneumonia.

[0065] Step 4: Obtain multi-dimensional feature indicators of the object to be diagnosed, which are consistent with the feature indicators during model construction; encode and normalize the obtained feature indicators according to the above data preprocessing steps to generate standardized test samples.

[0066] Step 5: Input the standardized test sample into the trained Pneumocystis jirovecii pneumonia diagnostic model. The model outputs the probability value that the subject to be diagnosed is a patient with Pneumocystis jirovecii pneumonia.

[0067] Step 6: Set diagnostic criteria: If the diagnosis is positive for Pneumocystis jirovecii pneumonia, it is considered a suspected or confirmed case; if the diagnosis is negative, it is considered that there is no significant possibility of disease. At the same time, the importance ranking of each feature is output to provide a reference for clinical diagnosis.

[0068] This embodiment uses the coefficient of determination (R²). 2 The model is evaluated using the score, mean squared error (MSE), root mean squared error (RMSE), and mean absolute error (MAE). The coefficient of determination (R²) is also used. 2 The model score measures the proportion of variance in the target variable explained by the model; mean squared error (MSE) is the average of the squared differences between predicted and true values; root mean squared error (RMSE) is the square root of MSE; mean absolute error (MAE) is the average of the absolute differences between predicted and true values, and is an important scoring indicator for model evaluation. Model performance meets the coefficient of determination (R²). 2Score ≥ 99.5%, Mean Squared Error (MSE) < 0.004, Root Mean Squared Error (RMSE) < 0.063, Mean Absolute Error (MAE) < 0.0089.

[0069] Example 2: A GBDT-based diagnostic device for Pneumocystis jirovecii pneumonia includes a data acquisition module, a data preprocessing module, a feature engineering module, a model calculation module, and a result output module connected in sequence. The model calculation module stores the model constructed by the method described in Example 1.

[0070] Example 3: The computer-readable storage medium of this example stores a computer program that, when executed by a processor, implements the steps in the GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia of Example 1.

[0071] The computer-readable storage medium in this embodiment can be an internal storage unit of the terminal, such as the terminal's hard disk or memory; the computer-readable storage medium in this embodiment can also be an external storage device of the terminal, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc. equipped on the terminal; furthermore, the computer-readable storage medium can include both the terminal's internal storage unit and external storage devices.

[0072] The computer-readable storage medium of this embodiment is used to store computer programs and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0073] Example 4: The computer device of this example includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia of Example 1.

[0074] In this embodiment, the processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The memory can include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory can also include non-volatile random access memory. For example, the memory can also store device type information.

[0075] Those skilled in the art will clearly understand that each implementation can be achieved using software plus the necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0076] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia, characterized in that, Includes the following steps: Step 1: Collect case data of clinically diagnosed Pneumocystis pneumonia patients, case data of lung infections without Pneumocystis pneumonia, and control data of healthy individuals to form the original dataset; the case data includes clinical characteristics, laboratory characteristics, and imaging characteristics; Step 2: Clean and optimize the original dataset; Step 3: Construct a gradient boosting decision tree model, train and optimize it using the original dataset, and obtain a trained diagnostic model for Pneumocystis jirovecii pneumonia. Step 4: Obtain the characteristic indicators of the object to be diagnosed, and clean and optimize them according to Step 2 to generate standardized test samples; Step 5: Input the standardized test sample into the trained Pneumocystis jirovecii pneumonia diagnostic model. The model outputs the probability value that the subject to be diagnosed is a patient with Pneumocystis jirovecii pneumonia. Step 6: If the result is positive for Pneumocystis jirovecii pneumonia, it is considered a suspected or confirmed case; if the result is negative, it is considered that there is no significant possibility of disease. At the same time, the importance ranking of each feature is output to provide a reference for clinical diagnosis.

2. The GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia according to claim 1, characterized in that, The specific case data is as follows: Clinical features: age, sex, type of immunodeficiency, duration of symptoms, degree of fever, and grade of dyspnea; Laboratory characteristics: hexamine silver staining results, Pneumocystis jirovecii DNA, 1,3-β-D-glucan content, Δ lactate dehydrogenase, procalcitonin, CD4+ T cell count, CD4+ T cell percentage, C-reactive protein, and complete blood count indicators; Imaging features: distribution of ground-glass opacities on chest CT, presence of consolidation, and cyst formation.

3. The GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia according to claim 2, characterized in that, Step 2 specifically includes: Step 2-1: Remove samples with more than 20% missing values, and fill the remaining missing values ​​with the median or mode of the corresponding feature; identify and remove outliers using the 3σ criterion or box plot method. Step 2-2, Feature Encoding and Normalization: Categorical features are converted into numerical features using one-hot encoding or label encoding; continuous features are standardized using Z-score. Steps 2-3: The preprocessed dataset is randomly divided into training set, test set and validation set in a ratio of 7:2:

1. The proportions of patients with Pneumocystis jirovecii pneumonia, non-pneumonia patients and healthy people are consistent in the three sets of datasets.

4. The GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia according to claim 3, characterized in that, Step 3 specifically includes the following steps: Step 3-1: Initialize the model and set the basic hyperparameter range; Step 3-2, Initialize the strong learner The CART regression tree is trained round by round for a total of M rounds to obtain the weak learner for each round. The final strong learner is obtained by weighting and summing all the weak learners. ; Step 3-3: Retrain the model using the optimal hyperparameter combination to obtain the final diagnostic model for Pneumocystis jirovecii pneumonia.

5. The GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia according to claim 4, characterized in that, The specific process of training a CART regression tree round by round is as follows: For the m-th round, m=1,2,...,M, perform the following operations: For each sample i, compute the previous model. loss function for The negative gradient is used as the pseudo residual for this round. ; Using the features of all current samples as input, and pseudo residuals Using the output labels, train a CART regression tree to obtain the m-th weak learner. ; The weighted prediction result of the m-th tree is added to the overall strong learner to obtain the model after this iteration: ; in, These are the weights for the weak learner.

6. A GBDT-based diagnostic device for Pneumocystis jirovecii pneumonia, characterized in that, The system includes a data acquisition module, a data preprocessing module, a feature engineering module, a model calculation module, and a result output module, which are connected in sequence. The model calculation module stores the model constructed by the GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia as described in any one of claims 1-5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia as described in any one of claims 1-5.

8. A computer device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the GBDT-based diagnostic method for Pneumocystis jirovecii pneumonia as described in any one of claims 1-5.