Method for constructing pneumonia screening and risk prediction model based on reverse neural network

By constructing a convex hull-pneumonia tree structure based on a reverse neural network and using a random forest strategy to screen features, and optimizing the BP neural network, the problem of feature screening and prediction in the diagnosis of bacterial pneumonia was solved. This enabled efficient and low-cost screening and risk prediction of bacterial pneumonia, supporting clinical diagnosis and early warning.

CN121922338APending Publication Date: 2026-04-24LIAONING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LIAONING NORMAL UNIVERSITY
Filing Date
2026-01-13
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing technologies for diagnosing bacterial pneumonia suffer from slow convergence, susceptibility to local optima, high computational costs, severe overfitting, and high misdiagnosis rates, making it difficult to simultaneously meet the clinical needs for low feature dimensionality, high classification accuracy, and low computational costs.

Method used

A backpropagation neural network-based approach was adopted, which uses a convex hull-pneumonia tree structure and a random forest strategy to select features, constructs a backpropagation neural network model, calculates feature weights by combining information gain, optimizes feature subsets and performs multiple iterations of training to form a bacterial pneumonia screening and risk prediction model.

Benefits of technology

It achieves efficient feature screening and high-accuracy diagnosis of bacterial pneumonia, reduces computational costs, improves the model's classification performance, and can effectively distinguish bacterial pneumonia from diseases with similar symptoms, supporting clinical auxiliary diagnosis and risk warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121922338A_ABST
    Figure CN121922338A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of medical intelligent diagnosis and machine learning, and provides a pneumonia screening and risk prediction model construction method based on a reverse neural network, and the method comprises the steps: firstly carrying out the preprocessing of a bacterial pneumonia clinical symptom data set, and dividing a multi-classification problem into a plurality of binary classification tasks; secondly, constructing a CPT algorithm based on a random forest and a convex hull theory, calculating a feature weight through information gain, and screening out high-contribution symptom features; and finally, inputting the screened features into the optimized BPNN, and obtaining a prediction model through repeated iterative training. The method has good classification accuracy, the number of the selected features is obviously reduced compared with a traditional model, and the method can be used as a clinical auxiliary diagnosis tool, is applied to clinical bacterial pneumonia infection screening and severe risk early warning, and provides decision support for timely treatment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical intelligent diagnosis and machine learning technology, and particularly relates to a method for constructing a pneumonia screening and risk prediction model based on a reverse neural network. Background Technology

[0002] Bacterial pneumonia is an acute respiratory infectious disease caused by bacteria such as Streptococcus pneumoniae and Haemophilus influenzae, characterized by rapid onset and progression. Clinical data shows that delayed diagnosis can increase the risk of disease deterioration by more than 40%, and even lead to respiratory failure. Currently, clinical diagnosis relies on specialized equipment such as MRI and chest X-rays, while primary care hospitals depend more on symptom assessment. However, the symptoms of bacterial pneumonia, such as fever and cough, highly overlap with those of influenza and the common cold, resulting in a high rate of misdiagnosis.

[0003] To address the aforementioned issues, existing technologies primarily employ machine learning algorithms to construct predictive models. These mainly include BPNN, metaheuristic optimization algorithms, and traditional classification algorithms. BPNN, due to its nonlinear mapping capabilities, has been used in pneumonia diagnosis, but it suffers from slow convergence, susceptibility to local optima, and overfitting issues when processing high-dimensional clinical features. Common metaheuristic optimization algorithms, such as Binary Particle Swarm Optimization (BPSO) and Grasshopper Optimization Algorithm (GOA), can be used for feature selection, but require manually setting numerous parameters such as particle velocity and inertia weights, and suffer from significant drawbacks such as numerous iterations and high computational costs. Traditional classification algorithms mostly classify features based on symptoms. While these methods reduce computational costs to some extent, they are sensitive to redundant features and suffer from severe overfitting leading to poor generalization.

[0004] Since existing technologies cannot simultaneously meet the clinical needs of "low feature dimensionality, high classification accuracy, and low computational cost", a model that can balance feature selection efficiency and prediction accuracy is needed. Summary of the Invention

[0005] The purpose of this invention is to provide a method for constructing a pneumonia screening and risk prediction model based on a reverse neural network, in order to solve the problems mentioned in the background art.

[0006] The present invention is implemented as follows: a method for constructing a pneumonia screening and risk prediction model based on a reverse neural network includes the following steps: Step 1: Obtain clinical data of patients with bacterial pneumonia and similar symptoms, and preprocess the relevant datasets to obtain a binarized dataset; Step 2: Construct a convex hull-pneumonia tree structure based on the binarized dataset; Step 3: Calculate the information gain of features based on the random forest strategy, select high-weight features to form the optimal feature subset, and input it into the BP neural network for classification training to obtain the optimal classification model; Step 4: Evaluate the performance of the classification model to obtain a predictive model for bacterial pneumonia infection and severe illness risk.

[0007] In a further technical solution, the dataset used in step 1 is from the public datasets BacterialPneumonia, FLU, COLDSymptoms and BacterialPneumoniaSymptomsChecker, which includes demographic characteristics, clinical symptoms and laboratory test variables. After organizing the dataset, the multi-class problem is broken down into multiple binary classification tasks. A binary feature matrix is ​​constructed for each binary classification task, where the presence of a feature is marked as 1 and the absence of a feature is marked as 0.

[0008] In a further technical solution, step 2 includes the following specific steps: Step 2.1: Recursively partition the data matrix obtained in the data processing stage, construct the pneumonia tree structure, and create an array of non-leaf nodes. with leaf node array Store the pneumonia tree; Step 2.2: Based on the obtained pneumonia tree structure, perform edge depth search and arc replacement to make the edges approximate the convex hull shape; Step 2.3: Further optimize the CPT structure using a clockwise rotation function. Assume there are three feature points on the CPT structure, denoted as... , and The farthest outer point is selected by calculating the relative positions of three points, thereby eliminating unnecessary points and ensuring that the convex hull accurately reflects the data distribution; the clockwise rotation function value is denoted as... The calculation formula is: (1); like ,but , , Three points are collinear, corresponding to redundant features; this region should be discarded. ,when At the edge Left side, keep ;like ,when At the edge On the right, delete ; Step 2.4: By performing a depth search on the pneumonia tree, extract the feature boundaries of the four basic directions as the reference vertices of the convex hull, and combine them with the edges optimized in Step 2.2 to form a complete CPT structure.

[0009] A further technical solution, the specific steps of step 2.2 are as follows: For each initial edge, perform a depth-first search along the hierarchical structure of the pneumonia tree to find edges that are not within the convex hull and reach a certain edge. The distance is greater than this edge All points above If a point that meets the condition is found, the original edge is moved to the nearest point. Replace with two new arcs.

[0010] In a further technical solution, step 3 includes the following specific steps: Step 3.1: Combine the random forest strategy to calculate feature weights using information gain, select the CPT with high feature weights to obtain the optimal feature subset; assuming bacterial pneumonia features... The relevant information gain is : (2); in, express Possible values, For bacterial pneumonia samples, for The value in and the first At each node All samples with the same value for The information entropy is calculated using the following formula: (3); in, This represents the total number of sample classes. express The proportion of each sample; similarly, for The information entropy is calculated using the following formula: (4); in, Representing a subset The Middle The proportion of class samples; Step 3.2: After obtaining the optimal feature subset, the dataset is fed into the BPNN network for training. The specific operation is as follows:

[0011] First, randomly initialize all weights and biases of the network, and then input the feature vector... Transmitted to the input layer, where For the first Each weight; Secondly, to achieve the non-linear transformation of data from the transport layer to the hidden layer, assume the weights from the input layer to the hidden layer are... Hidden layer bias is The net input of each hidden layer neuron is obtained through calculation. : (6); in, For the first hidden layer from the input layer Each weight; At the same time, use activation function Calculate the output of each neuron in the hidden layer : (7); (8); in, The threshold value for the hidden layer; Then, the input to the output layer is calculated to produce the final prediction result; assuming the input to each neuron in the output layer is... The calculation formula is as follows: (9); in, For the first For each output layer weight, its gradient is equal to the error term of the next layer neuron multiplied by the output of the previous layer neuron. For the first The output of each hidden layer neuron; Finally, the activation function is used again to calculate the final output of each neuron in the output layer. : (10); (11); in, This is the transfer function for the inverse neural network, which directly returns the input value. For the output layer of the inverse neural network The bias value of the nth neuron is used to coordinate with the output layer. The input of each neuron; At this point, the network's prediction has been generated. It is compared with the true label to calculate the error. Through backpropagation of the error, the magnitude of each weight's contribution to the total error is obtained, and then the error is reduced by updating the weights. This process is iterated until the network's output error is reduced to an acceptable level or the predetermined number of iterations is reached.

[0012] In a further technical solution, the BP neural network structure used in step 3.2 consists of an input layer, a hidden layer, and an output layer. The input layer receives bacterial pneumonia feature data filtered by the CPT algorithm, and the number of neurons in it is the number of features in the optimal feature subset. Hidden layers are responsible for non-linear changes, and the number of neurons within them... Determined using the following formula: (5); in, This represents the number of neurons in the hidden layer. It is the number of neurons in the input layer. It is the number of neurons in the output layer. It is an adjustment constant that takes the value of an integer between [1, 10]. The output layer is responsible for outputting the final classification result.

[0013] This invention provides a method for constructing a pneumonia screening and risk prediction model based on a backpropagation neural network. The method first preprocesses the clinical symptom dataset of bacterial pneumonia, decomposing the multi-classification problem into multiple binary classification tasks. Secondly, a CPT algorithm is constructed based on random forest and convex hull theory, and feature weights are calculated using information gain to select high-contribution symptom features. Finally, the selected features are input into an optimized backpropagation neural network, and the prediction model is obtained through multiple iterations of training. This method exhibits good classification accuracy and significantly reduces the number of selected features compared to traditional models. It can be used as a clinical auxiliary diagnostic tool for screening bacterial pneumonia infection and providing early warning of severe disease risk, thus offering decision support for timely treatment. Attached Figure Description

[0014] Figure 1 A flowchart illustrating the method for constructing a pneumonia screening and risk prediction model based on a reverse neural network, as provided in an embodiment of the present invention. Figure 2 The diagram shows the evolution of CPT (where a, b, and c represent the initial matrix, the refinement process of CPT, and the convex hull result formed by the final CPT, respectively). Figure 3 This is a flowchart of the network training process. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0016] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.

[0017] like Figures 1-3 As shown, a method for constructing a pneumonia screening and risk prediction model based on a reverse neural network, according to an embodiment of the present invention, includes the following steps: Step 1: Obtain clinical data of patients with bacterial pneumonia and similar symptoms, and preprocess the relevant datasets to obtain a binarized dataset; First, the datasets used in this method are from the publicly available datasets Bacterial Pneumonia, FLU, COLDSymptoms, and Bacterial PneumoniaSymptomsChecker, which include demographic characteristics, clinical symptoms, and laboratory test variables. After preparing the datasets, the multi-class problem is decomposed into multiple binary classification tasks. A binary feature matrix is ​​constructed for each binary classification task, where the presence of a feature is marked as 1, and the absence of a feature is marked as 0.

[0018] Step 2: Construct a convex hull-pneumonia tree structure based on the binarized dataset; Step 2.1: Recursively segment the complex data matrix obtained in the data processing stage to construct a pneumonia tree ( Create a tree structure and an array of non-leaf nodes. with leaf node array Store the pneumonia tree.

[0019] Step 2.2: Since the initial edges may not accurately cover all points, it is necessary to perform edge depth search and arc replacement based on the obtained pneumonia tree structure to make the edges approximate the convex hull shape. The main operation is: perform a depth search along the hierarchical structure of the pneumonia tree for each initial edge, and find edges that are not inside the convex hull but reach a certain edge. The distance is greater than this edge. All points above The point at which the distance is found. If a point that meets the conditions is found, the original edge is moved... Replace with two new arcs.

[0020] Step 2.3: The CPT structure is not perfect at this point and needs further optimization using a clockwise rotation function. Assume the CPT structure has three feature points, denoted as... , and The farthest outer point is selected by calculating the relative positions of three points, thus eliminating unnecessary points and ensuring that the convex hull accurately reflects the data distribution. The clockwise rotation function value is denoted as... The calculation formula is: (1); like ,but , , Three points are collinear, corresponding to redundant features; this region should be discarded. ,when At the edge Left side, keep ;like ,when At the edge On the right, delete .

[0021] Step 2.4: Then, through a depth search of the pneumonia tree, extract the feature boundaries of the four basic directions as the reference vertices of the convex hull, and combine them with the edges optimized in Step 2.2 to form a complete CPT structure.

[0022] Step 3: Calculate the information gain of features based on the random forest strategy, select high-weight features to form the optimal feature subset, and input it into the BP neural network for classification training to obtain the optimal classification model; Step 3.1: To avoid overfitting by a single CPT, ensure the stability of the selected features, and improve the classification performance of the BP neural network, it is necessary to combine the random forest strategy to calculate feature weights through information gain. Select the CPT with high feature weights to obtain the optimal feature subset. Assume the features of bacterial pneumonia are... The relevant information gain is : (2); in, express Possible values, For bacterial pneumonia samples, for The value in and the first At each node All samples with the same value for The information entropy is calculated using the following formula: (3); in, This represents the total number of sample classes. express The proportion of each sample; similarly, for The information entropy is calculated using the following formula: (4); in, Representing a subset The Middle The proportion of class samples.

[0023] Step 3.2: After obtaining the optimal feature subset, put the dataset into the BPNN network for training.

[0024] Backpropagation (BP) neural networks are classic neural networks that compute outputs through forward propagation and update weights through backpropagation of errors, possessing powerful nonlinear mapping capabilities. The BP neural network structure used in this method consists of an input layer, hidden layers, and an output layer. The input layer receives bacterial pneumonia feature data filtered by the CPT algorithm; its number of neurons corresponds to the number of features in the optimal feature subset. The hidden layer is responsible for nonlinear transformations, and its number of neurons... Determined using the following formula: (5); in, This represents the number of neurons in the hidden layer. It is the number of neurons in the input layer. It is the number of neurons in the output layer. It is an adjustment constant with an integer value between [1, 10]. The output layer is responsible for outputting the final classification result.

[0025] The specific steps for training the target model using a BP neural network are as follows: First, randomly initialize all weights and biases of the network, and then input the feature vector... Transmitted to the input layer, where For the first Each weight.

[0026] Secondly, to achieve the non-linear transformation of data from the transport layer to the hidden layer, assume the weights from the input layer to the hidden layer are... Hidden layer bias is The net input of each hidden layer neuron can be obtained through calculation. : (6); in, For the first hidden layer from the input layer Each weight.

[0027] At the same time, use activation function Calculate the output of each neuron in the hidden layer .

[0028] (7); (8); in, This is the threshold value for the hidden layer.

[0029] Then, the input to the output layer is calculated to produce the final prediction. Let's assume the input to each neuron in the output layer is... .

[0030] (9); in, For the first For each output layer weight, its gradient is equal to the error term of the next layer neuron multiplied by the output of the previous layer neuron. For the first The output of each hidden layer neuron.

[0031] Finally, the activation function is used again to calculate the final output of each neuron in the output layer. : (10); (11); in, This is the transfer function for the inverse neural network, which directly returns the input value. For the output layer of the inverse neural network The bias value of the nth neuron is used to coordinate with the output layer. The input of each neuron.

[0032] At this point, the network has generated its prediction. This prediction is compared to the true label, and the error is calculated. Through error backpropagation, the network learns the magnitude of each weight's contribution to the total error and then updates the weights to reduce the error. This process iterates until the network's output error decreases to an acceptable level or a predetermined number of iterations is reached.

[0033] Step 4: Evaluate the performance of the classification model to obtain a predictive model for bacterial pneumonia infection and severe illness risk.

[0034] After parameter tuning and optimization, it was found that setting the initial learning rate to 0.1 and the target minimum error were optimal. At that time, the model was found to perform best. The performance evaluation of this model included accuracy, precision, recall, and F1 score.

[0035] To measure the performance of the constructed model, the precision and recall of patients with bacterial pneumonia of four different severity levels were calculated, and the results are shown in Table 1 below.

[0036] Table 1

[0037] As shown in Table 1, the constructed model achieved good precision, recall, and F1 scores in the classification of different diseases. The accuracy for colds and influenza was particularly high, indicating that the proposed model has high accuracy and relatively small error in identifying samples with colds and influenza, and can effectively distinguish these two diseases from bacterial pneumonia.

[0038] The experimental results of the constructed model are compared with those of other network models, as shown in Table 2 below.

[0039] Table 2

[0040] Table 2 shows that the CPTBP model (i.e., the constructed model) has a significantly higher average accuracy in predicting bacterial pneumonia infection and severity than the optimization algorithms BPSO and BGOA, the classification algorithms KNN and Decisiontree, and the neural network algorithms CNN and RBF. By comparing the average number of features selected, the CPTBP model chose 15 features for infection prediction, more than the BPSO algorithm, but with much higher accuracy. In severity prediction, the CPTBP algorithm selected 7 features, fewer than the other four algorithms, making it well-suited for predicting different infection types and severity levels.

[0041] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for constructing a pneumonia screening and risk prediction model based on a reverse neural network, characterized in that, Includes the following steps: Step 1: Obtain clinical data of patients with bacterial pneumonia and similar symptoms, and preprocess the relevant datasets to obtain a binarized dataset; Step 2: Construct a convex hull-pneumonia tree structure based on the binarized dataset; Step 3: Calculate the information gain of features based on the random forest strategy, select high-weight features to form the optimal feature subset, and input it into the BP neural network for classification training to obtain the optimal classification model; Step 4: Evaluate the performance of the classification model to obtain a predictive model for bacterial pneumonia infection and severe illness risk.

2. The method for constructing a pneumonia screening and risk prediction model based on a reverse neural network according to claim 1, characterized in that, In step 1, the dataset used comes from the public datasets Bacterial Pneumonia, FLU, COLDSymptoms and Bacterial PneumoniaSymptomsChecker, which include demographic characteristics, clinical symptoms and laboratory test variables. After organizing the dataset, the multi-class problem is broken down into multiple binary classification tasks. A binary feature matrix is ​​constructed for each binary classification task, where the presence of a feature is marked as 1 and the absence of a feature is marked as 0.

3. The method for constructing a pneumonia screening and risk prediction model based on a reverse neural network according to claim 1, characterized in that, Step 2 includes the following specific steps: Step 2.1: Recursively partition the data matrix obtained in the data processing stage, construct the pneumonia tree structure, and create an array of non-leaf nodes. with leaf node array Store the pneumonia tree; Step 2.2: Based on the obtained pneumonia tree structure, perform edge depth search and arc replacement to make the edges approximate the convex hull shape; Step 2.3: Further optimize the CPT structure using a clockwise rotation function. Assume there are three feature points on the CPT structure, denoted as... , and By calculating the relative positions of the three points, the farthest external point is filtered out, thereby eliminating unnecessary points and ensuring that the convex hull accurately reflects the data distribution. The function value for clockwise rotation is denoted as The calculation formula is: (1); like ,but , , Three points are collinear, corresponding to redundant features; this region should be discarded. ,when At the edge Left side, keep ;like ,when At the edge On the right, delete ; Step 2.4: By performing a depth search on the pneumonia tree, extract the feature boundaries of the four basic directions as the reference vertices of the convex hull, and combine them with the edges optimized in Step 2.2 to form a complete CPT structure.

4. The method for constructing a pneumonia screening and risk prediction model based on a reverse neural network according to claim 3, characterized in that, The specific steps of step 2.2 are as follows: For each initial edge, perform a depth-first search along the hierarchical structure of the pneumonia tree to find edges that are not within the convex hull and reach a certain edge. The distance is greater than this edge All points above If a point that meets the condition is found, the original edge is moved to the nearest point. Replace with two new arcs.

5. The method for constructing a pneumonia screening and risk prediction model based on a reverse neural network according to claim 3, characterized in that, Step 3 includes the following specific steps: Step 3.1: Combine the random forest strategy to calculate feature weights using information gain, select the CPT with high feature weights to obtain the optimal feature subset; assuming bacterial pneumonia features... The relevant information gain is : (2); in, express Possible values, For bacterial pneumonia samples, for The value in and the first At each node All samples with the same value for The information entropy is calculated using the following formula: (3); in, This represents the total number of sample classes. express The proportion of each sample; similarly, for The information entropy is calculated using the following formula: (4); in, Representing a subset The Middle The proportion of class samples; Step 3.2: After obtaining the optimal feature subset, the dataset is fed into the BPNN network for training. The specific operation is as follows: First, randomly initialize all weights and biases of the network, and then input the feature vector... Transmitted to the input layer, where For the first Each weight; Secondly, to achieve the non-linear transformation of data from the transport layer to the hidden layer, assume the weights from the input layer to the hidden layer are... Hidden layer bias is The net input of each hidden layer neuron is obtained through calculation. : (6); in, For the first hidden layer from the input layer Each weight; At the same time, use activation function Calculate the output of each neuron in the hidden layer : (7); (8); in, The threshold value for the hidden layer; Then, the input to the output layer is calculated to produce the final prediction result; assuming the input to each neuron in the output layer is... The calculation formula is as follows: (9); in, For the first For each output layer weight, its gradient is equal to the error term of the next layer neuron multiplied by the output of the previous layer neuron. For the first The output of each hidden layer neuron; Finally, the activation function is used again to calculate the final output of each neuron in the output layer. : (10); (11); in, This is the transfer function for the inverse neural network, which directly returns the input value. For the output layer of the inverse neural network The bias value of the nth neuron is used to coordinate with the output layer. The input of each neuron; At this point, the network's prediction has been generated. It is compared with the true label to calculate the error. Through backpropagation of the error, the magnitude of each weight's contribution to the total error is obtained, and then the error is reduced by updating the weights. This process is iterated until the network's output error is reduced to an acceptable level or the predetermined number of iterations is reached.

6. The method for constructing a pneumonia screening and risk prediction model based on a reverse neural network according to claim 5, characterized in that, In step 3.2, the network structure of the BP neural network used consists of an input layer, a hidden layer, and an output layer. The input layer receives bacterial pneumonia feature data filtered by the CPT algorithm, and the number of neurons in it is the number of features in the optimal feature subset. Hidden layers are responsible for non-linear changes, and the number of neurons within them... Determine using the following formula: (5); in, This represents the number of neurons in the hidden layer. It is the number of neurons in the input layer. It is the number of neurons in the output layer. It is an adjustment constant that takes the value of an integer between [1, 10]. The output layer is responsible for outputting the final classification result.