Bayesian network and rough set feature selection method for pneumonia pathogenesis diagnosis

Through Bayesian network and rough set feature selection method, the problems of overlapping symptoms, label ambiguity and data redundancy in the diagnosis of pneumonia etiology are solved, and higher diagnostic accuracy and efficiency are achieved.

CN119742050AActive Publication Date: 2025-04-01NANTONG UNIV

Patent Information

Application Number
CN202411806508.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-01
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

There are problems of overlapping symptoms, ambiguity of labels and redundant data characteristics in the diagnosis of etiology of pneumonia, resulting in inaccuracy and inefficiency of diagnosis.

Method used

The Bayesian network and rough set feature selection method are used to solve the overlap and ambiguity of etiology labels by constructing Bayesian network, a label confidence matrix is ​​generated, and the feature dependence is calculated based on the neighborhood rough set, and the optimal feature subset is screened based on significance and redundancy.

Benefits of technology

It improves the accuracy and efficiency of the diagnosis of pneumonia etiology, reduces the complexity and computational cost of the model, and provides more reliable label basic data and optimized feature sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119742050A_ABST
    Figure CN119742050A_ABST
Patent Text Reader

Abstract

The invention provides a Bayesian network and rough set feature selection method for pneumonia pathogenesis diagnosis, belongs to the technical field of medical information intelligent processing, and solves the technical problems of symptom overlapping, tag ambiguity and data feature redundancy in pneumonia pathogenesis diagnosis. According to the technical scheme, the method comprises the following steps of S1, performing data preprocessing on pneumonia data of a patient; s2, taking the patient features and the disease cause labels as nodes, constructing a Bayesian network to solve the disambiguation problem of the disease cause labels, and generating a label confidence coefficient matrix; s3, based on the neighborhood rough set, calculating the dependency degree of each feature on the disease cause label; and S4, screening an optimal feature set in combination with significance analysis and redundancy reduction. The method has the advantages that the pneumonia diagnosis scene serves as the application background, the problems of pathogenesis complexity and data redundancy of the patient can be effectively solved, the diagnosis reliability and efficiency are improved, the calculation cost is reduced, and technical support is provided for actual clinical diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent processing of medical information, and in particular to a Bayesian network and rough set feature selection method for pneumonia etiology diagnosis. Background Art

[0002] Pneumonia is one of the major diseases that causes high morbidity and mortality worldwide. Common causes include bacterial infection, viral infection, and fungal infection. There are significant differences in the treatment strategies for pneumonia with different causes. The accuracy of etiology diagnosis directly determines the effectiveness of treatment. However, in actual clinical diagnosis, there are some technical difficulties in etiology identification.

[0003] Patients with pneumonia often present with similar clinical symptoms, such as fever, cough, and dyspnea, which may be caused by a variety of causes. For example, both viral and bacterial pneumonia can cause fever, and patients may have overlapping or ambiguous labels when they are first diagnosed. Traditional diagnostic methods rely on empirical judgment, which can easily lead to misdiagnosis or missed diagnosis. Clinical diagnosis is usually based on a combination of symptom descriptions, laboratory tests such as white blood cell counts, C-reactive protein, and imaging tests such as chest radiographs or CT scans. These data are high-dimensional and have significant redundancy or noise.

[0004] In order to diagnose pneumonia, Nehary, Ebrahim A et al. in "Metric-Based Frame Selection and Deep Learning Model With Multi-Head Self Attention for Classification of Ultrasound Lung Video Images" selected key frames from lung ultrasound videos for classification by pre-training VGG16 and multi-head attention mechanism to distinguish between health, COVID-19 and bacterial pneumonia, and used a reweighting strategy to deal with the class imbalance problem. However, they did not take into account the feature overlap between COVID-19 and bacterial pneumonia and the failure to significantly eliminate redundancy.

[0005] In recent years, artificial intelligence methods have been gradually applied to the medical field. However, many feature extraction strategies in existing methods make it difficult to explain the actual contribution of each feature to the etiology diagnosis. In addition, feature redundancy has not been effectively eliminated, resulting in high complexity and poor generalization ability of the diagnostic model, which is difficult to meet the actual clinical application needs. Therefore, a method that can effectively handle label ambiguity and optimize feature selection is needed to improve the accuracy and efficiency of pneumonia etiology diagnosis. Summary of the invention

[0006] The present invention aims to solve technical problems such as symptom overlap, label ambiguity and data feature redundancy in the diagnosis of the cause of pneumonia, and provides a Bayesian network and rough set feature selection method for the diagnosis of the cause of pneumonia. The method takes the pneumonia diagnosis scenario as the application background, is used to accurately describe the cause and avoid excessive complexity of the model, and can effectively deal with the complexity of the patient's cause and data redundancy problems, which not only improves the reliability and efficiency of the diagnosis, but also reduces the computing cost, providing technical support for actual clinical diagnosis.

[0007] The inventive concept of the present invention is as follows: first, the present invention performs data preprocessing on the pneumonia data of the patient; then, a Bayesian network is constructed with patient characteristics and cause labels as nodes to solve the disambiguation problem of cause labels and generate a label confidence matrix; next, the dependence of each feature on the cause label is calculated based on the neighborhood rough set; finally, the optimal feature set is screened by combining significance analysis and redundancy reduction.

[0008] The present invention is achieved by the following measures: a Bayesian network and rough set feature selection method for pneumonia etiology diagnosis, comprising the following steps:

[0009] S1. Collect multimodal data of pneumonia patients, including symptom data, laboratory test results, and imaging examination features. First, statistical methods are used to complete the missing test indicators of some patients, and then data standardization is performed, that is, numerical features are normalized, and text features such as sputum color description are encoded as categorical variables;

[0010] S2. Construct a Bayesian network whose nodes include input features and etiology labels, solve the overlap and ambiguity problems of patient etiology labels, and finally generate a label confidence matrix;

[0011] S3, construct a neighborhood rough set model, divide the patient samples into multiple neighborhoods, divide them into equivalence classes according to the label confidence matrix, calculate the feature dependency by combining the neighborhood and equivalence class, and use it as the feature evaluation index;

[0012] S4. The significance of the feature is obtained based on the dependency, the mutual information and conditional entropy are calculated to obtain the redundancy of the feature, and the optimal feature subset is selected based on the significance and redundancy.

[0013] Furthermore, the specific steps of step S2 are as follows:

[0014] Step S2.1: Define the relationship between variables. According to the pneumonia data set, first let the random variables representing symptoms, laboratory indicators and other characteristics be C = {c 1 ,c 2 ,c 3 ,...,c i ,...,c n}, where c iis the i-th pneumonia feature, c n is the nth pneumonia feature, n is the number of features, let the random variable representing the cause label be L, and then introduce some additional conditional probability variables P partial , indicating the special relationship between some features and the target label; then assume the relationship between variables. Since the label is generally determined by multiple features, it is assumed that the feature has a direct impact on the label. The features C are assumed to be conditionally independent, which means that each feature is no longer related to each other after knowing the label L, and P partial Independent of the features, but directly related to the label L;

[0015] Step S2.2: Construct the graph structure of the Bayesian network, define the variables as nodes, and according to the relationship between the variables defined in the first step, feature C = {c 1 ,c 2 ,c 3 ,...,c i ,...,c n There are directed edges pointing to label L, indicating that the feature affects the label. There are no edges between features, and they are conditionally independent.

[0016] Step S2.3: Determine the conditional probability table for each node, which represents the probability distribution of the node. First, calculate the prior probability P(L) of each label L:

[0017]

[0018] This prior probability refers to the probability distribution of each label when no feature data is provided;

[0019] Then calculate the conditional probability distribution P(c i |L), that is, for each feature c i Given the label L, the probability distribution of each feature, assuming c i If it satisfies the normal distribution, then:

[0020]

[0021] Where μ is the characteristic c i The mean under label L, σ is the standard deviation, and exp(g) is the exponential function. Since the features are conditionally independent, the probability of each feature depends only on the label, and the formula for the joint conditional probability distribution P(C|L) is:

[0022]

[0023] Then calculate the partial conditional probability P partial (L), that is, the partial label probability of the sample for the category, whose probability value is 0 or 1;

[0024] Step S2.4: Calculate the posterior probability according to Bayes' theorem, combining the prior probability P(L) and conditional probability P(C|L) in step 3 and the partial conditional probability P partial (L) solves the posterior probability P(L||C,P partial ), since the features are conditionally independent, the theorem can be simplified to:

[0025]

[0026] Among them, L′ represents a certain label, and finally the posterior probability of each candidate label of each sample is used as the label confidence to form a label confidence matrix.

[0027] Furthermore, the specific steps of step S3 are as follows:

[0028] Step S3.1: Construct neighborhood granularity. First, for the sample set U = {x 1 ,x 2 ,x 3 ,...,x i ,...x m The feature set C = {c 1 ,c 2 ,c 3 ,...,c i ,...,c n}Calculate the dynamic threshold, where x i is the i-th sample, x m is the mth sample, m is the number of samples, and the neighborhood threshold δ B It is defined as a weighted combination of the standard deviations of the features of feature subset C, and the formula is as follows:

[0029]

[0030] Among them, σ(c) represents the standard deviation of feature c, represents the mean of feature c, |C| is the total number of features, and |g| represents the number of elements in the set. This formula measures the discreteness of each feature through the ratio of the standard deviation to the mean and adaptively adjusts the neighborhood threshold to adapt to the differences between features;

[0031] Next, define the sample x i In feature subset Neighborhood δ B (x i )

[0032] δ B (x i )={x j ∣∣Δ B (x i ,xj )≤δ B ,x i ,x j ∈U} (6)

[0033] Among them, Δ B (x i ,x j ) is the sample x i and x j The Euclidean distance on feature subset B, x i is the i-th sample, x j is the jth sample, δ B is the neighborhood threshold;

[0034] Finally, the neighborhood relationship matrix R is obtained, and the matrix element R ij Satisfy the following rules:

[0035]

[0036] Step S3.2: Generate equivalence classes according to the label confidence matrix in step 2, that is, directly generate equivalence classes by selecting the maximum confidence each time;

[0037] Step S3.2.1: Let the label set L = {L 1 ,L 2 ,L 3 ,...L i ,...,L k}, where L i is the i-th decision label, L k is the kth decision label, k is the number of labels, and the label confidence matrix P = [p ij ], where p ij Represents sample x i Belongs to label L j The confidence level, L j is the jth decision label, And satisfy:

[0038]

[0039] Step S3.2.2: For each sample x i The sample x is divided according to its maximum confidence label in the confidence matrix P. i The label is determined by the following formula:

[0040]

[0041] where argmax(g) represents p ij When the input j reaches the maximum value, for label L j , equivalence class Defined as:

[0042]

[0043] Step S3.3: Construct upper and lower approximate sets based on neighborhood granularity and equivalence classes and calculate the dependency.

[0044] Step S3.3.1: In the dynamic neighborhood threshold δ B Under the action of , the upper and lower approximate sets are defined based on the neighborhood relationship of the samples. For the equivalence class under the feature subset B Lower approximation set Indicates that all the neighbors in B completely belong to the equivalence class The sample set is defined as follows:

[0045]

[0046] Upper approximation set It represents the set of samples in which at least some samples in the neighborhood of feature subset B belong to the equivalence class, and is defined as follows:

[0047]

[0048] Step S3.3.2: Positive Domain POS B (U) is the set of all samples that can be accurately divided into equivalence classes, which is defined as:

[0049]

[0050] Dependence Dep(B,U) represents the classification ability of feature subset B on sample set U, which is defined as:

[0051]

[0052] Furthermore, the specific steps of step S4 are as follows:

[0053] Step S4.1: Calculate the significance of feature c k ∈C, whose significance is defined as adding feature c k The increment of the dependency after:

[0054] σ(c k ,B)=Dep(B∪{c k},U)-Dep(B,U) (15)

[0055] Significant representation feature c k The classification contribution to the current feature subset B, when feature c k The significance of σ(c k ,B)=0, remove it from the candidate feature set, otherwise add it to the candidate set;

[0056] Step S4.2: Redundancy is used to evaluate the repeated information between features. For feature c j ∈C, redundancy R(c i ,c j ) is defined as:

[0057]

[0058] Among them, I(c i ;c j ) represents feature c i and c j The mutual information, H(c i ) represents feature c i The entropy of the feature map is , and the redundancy reflects the degree of information overlap between features; the mutual information I(c i ;c j ) is used to measure two features c i and c i The correlation or information sharing degree between them is calculated as follows:

[0059]

[0060] Among them, p(x,y) represents c i and c i The probability of taking values ​​of x and y at the same time, p(x), p(y) are c i and c i The marginal probability distribution of i ) represents a single feature c i The degree of uncertainty is defined as:

[0061]

[0062] If the redundancy R(c i ,c j ) exceeds the set threshold of 0.9, and determines that c i With c i If there is high redundancy between them, the redundant features are deleted, and the optimized feature subset is finally obtained through the joint analysis of significance and redundancy;

[0063] Step S4.3: Through the joint analysis of significance and redundancy, the optimized feature subset is finally obtained.

[0064] Compared with the prior art, the present invention has the following beneficial effects:

[0065] 1. The present invention provides a Bayesian network and rough set feature selection method for pneumonia etiology diagnosis. First, a label confidence matrix is ​​generated based on some known etiology labels, and the association probability between labels is calculated through the Bayesian network to achieve dynamic disambiguation of etiology labels and form more reliable label basic data. This method improves the accuracy and reliability of data in etiology diagnosis and lays a solid foundation for subsequent feature selection.

[0066] 2. Based on mutual information and entropy, the present invention proposes a redundant feature measurement method, which quantifies the redundancy between features and eliminates redundant features that contribute less to etiology diagnosis, thereby optimizing the composition of the feature set. This method effectively avoids the interference of redundant features on diagnostic performance and improves the generalization ability and operating efficiency of the model.

[0067] 3. The present invention uses the synergistic drive feature selection strategy of significance and redundancy to eliminate redundant features while screening core features, thus achieving dynamic optimization of feature selection. This strategy improves the comprehensiveness and effectiveness of feature selection, significantly improves the accuracy and efficiency of pneumonia etiology diagnosis, and has important clinical application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0069] Figure 1 The present invention is a flow chart of the Bayesian network and rough set feature selection method for pneumonia etiology diagnosis.

[0070] Figure 2 Shown is a block diagram of the Bayesian network and rough set feature selection method for pneumonia etiology diagnosis of the present invention.

[0071] Figure 3 Shown is a specific flow chart of pneumonia feature simplification based on dynamic neighborhood rough sets of the present invention. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.

[0073] Example 1

[0074] See also Figures 1 to 3 This embodiment provides a Bayesian network and rough set feature selection method for pneumonia etiology diagnosis, including the following steps:

[0075] S1. Collect multimodal data of pneumonia patients, including symptom data, laboratory test results, and imaging examination features. First, statistical methods are used to complete the missing test indicators of some patients, and then data standardization is performed, that is, numerical features are normalized, and text features such as sputum color description are encoded as categorical variables;

[0076] S2. Construct a Bayesian network whose nodes include input features and etiology labels, solve the overlap and ambiguity problems of patient etiology labels, and finally generate a label confidence matrix;

[0077] S3, construct a neighborhood rough set model, divide the patient samples into multiple neighborhoods, divide them into equivalence classes according to the label confidence matrix, calculate the feature dependency by combining the neighborhood and equivalence class, and use it as the feature evaluation index;

[0078] S4. The significance of the feature is obtained based on the dependency, the mutual information and conditional entropy are calculated to obtain the redundancy of the feature, and the optimal feature subset is selected based on the significance and redundancy.

[0079] After preprocessing the original data set, a four-tuple decision information system is obtained as shown in Table 1:

[0080] Table 1

[0081]

[0082] Each sample in Table 1 has 1 to 3 candidate labels, L is the true label, where U = {x 1 ,x 2 ,…,x 10} means that there are 10 samples in this embodiment, C={c 1 ,c 2 ,…,c 5} represents the data characteristics of pneumonia, L={L 1 ,L 2 ,L 3} represents 3 decision labels.

[0083] Specifically, the specific steps of step S2 are as follows:

[0084] Step S2.1: Define the relationship between variables. According to the pneumonia data set, first let the random variables representing symptoms, laboratory indicators and other characteristics be C = {c 1 ,c 2 ,c 3 ,...,c i ,...,c n}, where c i is the i-th pneumonia feature, c nis the nth pneumonia feature, n is the number of features, let the random variable representing the cause label be L, and then introduce some additional conditional probability variables P partial , indicating the special relationship between some features and the target label; then assume the relationship between variables. Since the label is generally determined by multiple features, it is assumed that the feature has a direct impact on the label. The features C are assumed to be conditionally independent, which means that each feature is no longer related to each other after knowing the label L, and P partial Independent of the features, but directly related to the label L;

[0085] Step S2.2: Construct the graph structure of the Bayesian network, define the variables as nodes, and according to the relationship between the variables defined in the first step, feature C = {c 1 ,c 2 ,c 3 ,...,c i ,...,c n There are directed edges pointing to label L, indicating that the feature affects the label. There are no edges between features, and they are conditionally independent.

[0086] Step S2.3: Determine the conditional probability table for each node, which represents the probability distribution of the node. First, calculate the prior probability P(L) of each label L:

[0087]

[0088] This prior probability refers to the probability distribution of each label when no feature data is provided; thus, the prior probability of each label L is shown in Table 2 below:

[0089] Table 2

[0090]

[0091] Then calculate the conditional probability distribution P(c i |L), that is, for each feature c i Given the label L, the probability distribution of each feature, assuming c i Satisfies the normal distribution, then:

[0092]

[0093] Where μ is the characteristic c i The mean under label L, σ is the standard deviation, and exp(g) is the exponential function. Since the features are conditionally independent, the probability of each feature depends only on the label, and the formula for the joint conditional probability distribution P(C|L) is:

[0094]

[0095] In this example, due to the independence of the features, after calculating the normal distribution, the probabilities are multiplied to obtain the joint conditional probability P(C|L) as shown in Table 3 below:

[0096] Table 3

[0097]

[0098] Then calculate the partial conditional probability P paytial (l), that is, the partial label probability of the sample for the category, whose probability value is 0 or 1;

[0099] In this embodiment, the conditional probabilities of some tags are shown in Table 4 below:

[0100] Table 4

[0101]

[0102] Step S2.4: Calculate the posterior probability according to Bayes' theorem, combining the prior probability P(l), conditional probability P(C|L) and partial conditional probability P in step 3 partial (L) solves the posterior probability P(L||C,P partial ), since the features are conditionally independent, the theorem can be simplified to

[0103]

[0104] Where L′ represents a certain label, and finally the posterior probability of each candidate label of each sample is used as the label confidence to form a label confidence matrix.

[0105] In this embodiment, the posterior probability calculated from the prior probability, conditional probability and partial conditional probability is shown in Table 5 below:

[0106] Table 5

[0107]

[0108] Specifically, the specific steps of step S3 are as follows:

[0109] Step S3.1: Construct neighborhood granularity. First, for the sample set U = {x 1 ,x 2 ,x 3 ,...,x i ,...x m The feature set C = {c 1 ,c 2 ,c 3 ,...,c i ,...,c n}Calculate the dynamic threshold, where x iis the i-th sample, x m is the mth sample, m is the number of samples, and the neighborhood threshold δ B It is defined as a weighted combination of the standard deviations of the features of feature subset C, and the formula is as follows:

[0110]

[0111] Among them, σ(c) represents the standard deviation of feature c, represents the mean of feature c, |C| is the total number of features, and |g| represents the number of elements in the set. This formula measures the discreteness of each feature through the ratio of the standard deviation to the mean and adaptively adjusts the neighborhood threshold to adapt to the differences between features;

[0112] Next, define the sample x i In feature subset Neighborhood δ B (x i )

[0113] δ B (x i )={x j ∣∣Δ B (x i ,x j )≤δ B ,x i ,x j ∈U} (6)

[0114] Among them, Δ B (x i ,x j ) is the sample x i and x j The Euclidean distance on feature subset B, x i is the i-th sample, x j is the jth sample, δ B is the neighborhood threshold;

[0115] In this embodiment, feature subset B = {c 1 ,c 2, ,c 5}, the distance matrix Δ calculated based on the Euclidean distance B As shown below:

[0116]

[0117] Finally, we can get the neighborhood relationship matrix R, the matrix element R ij Satisfy the following rules:

[0118]

[0119] In this embodiment, the neighborhood threshold δ is calculated B =0.5857, combining the Euclidean distance and the neighborhood threshold, we can get the neighborhood relationship R on the feature subset B ij , the specific relationship is as follows:

[0120]

[0121] Step S3.2: Generate equivalence classes according to the label confidence matrix in step 2, that is, directly generate equivalence classes by selecting the maximum confidence each time;

[0122] Step S3.2.1: Let the label set L = {L 1 ,L 2 ,L 3 ,...L i ,...,L k}, where L i is the i-th decision label, L k is the kth decision label, k is the number of labels, and the label confidence matrix P = [p ij ], where p ij Represents sample x i Belongs to label L j The confidence level, L j is the jth decision label, And satisfy:

[0123]

[0124] Step S3.2.2: For each sample x i The sample x is divided according to its maximum confidence label in the confidence matrix P. i The label is determined by the following formula:

[0125]

[0126] where arg max(g) represents p ij When the input j reaches the maximum value, for label L j , equivalence class Defined as:

[0127]

[0128] In this embodiment, for the sample set U={x 1 ,x 2 ,...,x 8}, according to the above definition, the equivalence class division result can be: E L1 ={x 1 ,x 5 ,x 7},E L2 ={x 2 ,x 4},E L3 ={x 3 ,x 6 ,x 8}.

[0129] Step S3.3: Construct upper and lower approximate sets based on neighborhood granularity and equivalence classes and calculate the dependency.

[0130] Step S3.3.1: In the dynamic neighborhood threshold δ B Under the action of , the upper and lower approximate sets are defined based on the neighborhood relationship of the samples. For the equivalence class under the feature subset B Lower approximation set Indicates that all the neighbors in B completely belong to the equivalence class The sample set is defined as follows:

[0131]

[0132] Upper approximation set It represents the set of samples in which at least some samples in the neighborhood of feature subset B belong to the equivalence class, and is defined as follows:

[0133]

[0134] In this embodiment, it can be obtained that for category L 1 ,L 2 The lower approximation set of is empty, while the lower approximation set of category L3 contains sample x 3 .

[0135] Step S3.3.2: Positive Domain POS B (U) is the set of all samples that can be accurately divided into equivalence classes, which is defined as:

[0136]

[0137] Dependence Dep(B,U) represents the classification ability of feature subset B on sample set U, which is defined as:

[0138]

[0139] In this embodiment, the positive domain POS can be calculated based on the obtained lower approximation set. B (U) = 0 + 0 + 1 = 1, dependency

[0140] Specifically, the specific steps of step S4 are as follows:

[0141] Step S4.1: Calculate the significance of feature ck ∈C, whose significance is defined as adding feature c k The increment of the dependency after:

[0142] σ(c k ,B)=Dep(B∪{c k},U)-Dep(B,U) (15)

[0143] Significant representation feature c k The classification contribution to the current feature subset B, when feature c k The significance of σ(c k ,B)=0, remove it from the candidate feature set, otherwise add it to the candidate set;

[0144] In this embodiment, if the added feature is c 7 , then the current feature set is {c 1 ,c 2 ,c 5 ,c 7}, we can get Dep({c 1 ,c 2 ,c 5 ,c 7},U)=0.25,σ(c 7 ,B)=0.25-0.125=0.125>0, so it is added to the candidate set.

[0145] Step S4.2: Redundancy is used to evaluate the repeated information between features. For feature c j ∈C, redundancy R(c i ,c j ) is defined as:

[0146]

[0147] Among them, I(c i ;c j ) represents feature c i and c j The mutual information, H(c i ) represents feature c i The entropy of the feature map is , and the redundancy reflects the degree of information overlap between features; the mutual information I(c i ;c j ) is used to measure two features c i and c i The correlation or information sharing degree between them is calculated as follows:

[0148]

[0149] Among them, p(x,y) represents c i and ci The probability of taking values ​​of x and y at the same time, p(x), p(y) are c i and c i The marginal probability distribution of i ) represents a single feature c i The degree of uncertainty is defined as:

[0150]

[0151] If the redundancy R(c i ,c j ) exceeds the set threshold of 0.9, and determines that c i With c i If there is high redundancy between them, the redundant features are deleted, and the optimized feature subset is finally obtained through the joint analysis of significance and redundancy;

[0152] In this embodiment, the calculated feature c7 is relative to the existing feature {c 1 ,c 2 ,c 5}, the entropy H(c 7 )=1, mutual information I(c 7 ;c 1 )=0,I(c 7 ;c 2 )=0.18872,i(c 7 ;c 5 )=0, that is, the redundancy R(c 7 ,c 1 )=0,R(c 7 ,c 2 )=0.1887,R(c 7 ,c 5 )=0, so c7 is not a redundant feature.

[0153] Step S4.3: Through the joint analysis of significance and redundancy, the optimized feature subset red is finally obtained.

[0154] In this embodiment, the feature subset red = {c 1 ,c 2 ,c 5 ,c 7}.

[0155] Example 2

[0156] Referring to Example 1, this example will use the parameters and results calculated in Example 1 to compare with the traditional method to prove the superiority of this example. In the specific comparison, we used different models and compared in different indicators. The final results show that this example is preferred over the traditional method.

[0157] 1. Traditional Algorithm

[0158] With reference to relevant research at home and abroad, this embodiment selects the following algorithm:

[0159] 1.1 Partial label selection algorithm

[0160] FSPF: Maps the possibility of some labels to a specific probability distribution through feature subspaces, assumes that each feature contributes to the distribution of some labels in a certain subspace, and gradually optimizes the probability distribution of label prediction in multidimensional space. Disadvantages: Modeling through subspaces and latent spaces is easily affected by high-dimensional features or complex label distributions.

[0161] LSPF: embeds part of the label information into a latent space, optimizes the label distribution prediction by using the correlation between features, and learns the potential label distribution through high-dimensional mapping. Disadvantages: The computational complexity is similar to FSPF, and the running speed is slow in large-scale scenarios.

[0162] RDPF: It uses a randomized method to directly simplify the calculation of the dependency relationship between features and predict the label distribution using a specific random dependency function. Disadvantages: It relies on random functions to simplify the calculation and lacks an accurate description of the relationship between features and labels.

[0163] PFFL: It uses a forward step-by-step learning method to iteratively optimize the distribution of some labels step by step, paying special attention to the importance of some features and directly associating them with the label distribution. Disadvantages: It is necessary to learn the importance of features step by step, and a high proportion of missing labels may affect the effect of step-by-step learning.

[0164] 1.2 Feature Selection Algorithm

[0165] NMI_mRMR: A feature selection method that combines neighborhood rough set theory and mutual information theory. It is mainly used for feature selection of high-dimensional data sets. Based on the mRMR framework, it maximizes the correlation between features and target variables and minimizes the redundancy between features. Disadvantages: Due to the need to calculate the neighborhood mutual information between features and targets and between features, the amount of calculation is large, especially on high-dimensional data sets, and it focuses more on the analysis of local neighborhood features, which may ignore global pattern information.

[0166] FARNEM: Using neighborhood rough set theory, combined with forward selection strategy, that is, sorting features according to their importance to the target variable, gradually adding the best features, and removing redundant features in the forward addition process to ensure the simplicity of the final feature set. Disadvantages: First, the setting of the neighborhood radius will directly affect the calculation of the dependency, and the quality of the initial feature sorting will significantly affect the final selection result. And due to the use of the forward selection strategy, the algorithm may stagnate at the local optimal point, resulting in the feature set not reaching the global optimal.

[0167] 2. Comparison indicators

[0168] This embodiment is used for feature selection tasks. Classification accuracy is an important indicator for evaluating feature selection methods. By using different classification models on the same data set, the effect of feature selection is tested and the changes in classification performance are observed. We use three classification models: support vector machine (SVM), random forest (RF), and K nearest neighbor algorithm (KNN) for evaluation.

[0169] SVM: It is good at handling high-dimensional data and nonlinear classification problems. Its classification performance depends largely on the distinguishability of features. Whether the feature selection method can improve the classification accuracy of SVM is an important aspect to verify its effectiveness.

[0170] RF: Random forest improves classification performance by integrating multiple decision trees. It has a natural ability to evaluate feature importance. Its classification accuracy can reflect the improvement of feature selection on the overall performance of the model, while demonstrating the effect of removing feature redundancy.

[0171] KNN: is an instance-based classification method that is very sensitive to changes in the dimensionality of the feature space. It can observe whether feature selection can improve the classification performance of KNN and verify whether dimensionality reduction optimizes the feature space.

[0172] 3. Comparison results

[0173] It can be seen from the data that this embodiment performs well in all evaluation indicators and is significantly better than other models. In partial label disambiguation based on Bayesian networks, the accuracy of using Bayesian networks reaches 92.3%, which is better than other algorithms and 2.1% higher than PFFL. Compared with FSPF and LSPF, the accuracy is increased by about 6.7%. This shows that the Bayesian network better models the relationship between labels through conditional probability distribution. In terms of time complexity, the theoretical complexity of this embodiment is better than O(n(n+d+L)) of FSPF and LSPF, especially when the number of samples n is large. Although RDPF has the lowest time complexity, its accuracy is only 79.4%, which cannot meet the needs of actual applications.

[0174] In the feature selection of this embodiment, the classification performance of SVM is significantly improved, and the accuracy reaches 0.9491, which is significantly better than 0.8260 of FARNEM and 0.7819 of NMI_mRMR. This shows that the method of this embodiment is more effective in high-dimensional feature correlation analysis. The accuracy on KNN is 0.8824, which is significantly higher than 0.8104 of FARNEM and 0.4727 of NMI_mRMR. This shows that the method of this embodiment can effectively optimize the feature space and reduce the noise interference of the dimension. The accuracy on RF is 0.9051, which is better than 0.8155 of FARNEM and 0.7819 of NMI_mRMR. The method of this embodiment effectively improves the overall performance of the classifier during feature selection.

[0175] Table 6 Comparison table of label selection between this embodiment and other parts

[0176]

[0177] Table 7 Comparison table of this embodiment with other feature selection algorithms

[0178]

[0179] The above description is only an exemplary embodiment of the present invention, and does not limit the scope of patent protection of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the scope of patent protection of the present invention.

Claims

1. A Bayesian network and rough set feature selection method for pneumonia etiology diagnosis, characterized in that: The following steps are involved: S1. Collect multimodal data of pneumonia patients, including symptom data, laboratory test results, and imaging examination features. First, statistical methods are used to complete the missing test indicators of some patients, and then data standardization is performed, that is, numerical features are normalized, and text features such as sputum color description are encoded as categorical variables; S2. Construct a Bayesian network whose nodes include input features and etiology labels, solve the overlap and ambiguity problems of patient etiology labels, and finally generate a label confidence matrix; S3, construct a neighborhood rough set model, divide the patient samples into multiple neighborhoods, divide them into equivalence classes according to the label confidence matrix, calculate the feature dependency by combining the neighborhood and equivalence class, and use it as the feature evaluation index; S4. The significance of the feature is obtained based on the dependency, the mutual information and conditional entropy are calculated to obtain the redundancy of the feature, and the optimal feature subset is selected based on the significance and redundancy.

2. The Bayesian network and rough set feature selection method for pneumonia etiology diagnosis according to claim 1 is characterized in that: The step S2 comprises the following steps: Step S2.1: Define the relationship between variables. According to the pneumonia data set, first let the random variables representing symptoms, laboratory indicators and other characteristics be C = {c1, c2, c3, ..., c i ,...,c n }, where c i is the i-th pneumonia feature, c n is the nth pneumonia feature, n is the number of features, let the random variable representing the cause label be L, and then introduce some additional conditional probability variables P partial , indicating the special relationship between some features and the target label; then assume the relationship between variables. Since the label is generally determined by multiple features, it is assumed that the feature has a direct impact on the label. The features C are assumed to be conditionally independent, which means that each feature is no longer related to each other after knowing the label L, and P partial Independent of the features, but directly related to the label L; Step S2.2: Construct the graph structure of the Bayesian network, define the variables as nodes, and according to the relationship between the variables defined in the first step, feature C = {c1, c2, c3, ..., c i ,...,c n There are directed edges pointing to label L, indicating that the feature affects the label. There are no edges between features, and they are conditionally independent. Step S2.3: Determine the conditional probability table for each node, which represents the probability distribution of the node. First, calculate the prior probability P(L) of each label L: This prior probability refers to the probability distribution of each label when no feature data is provided; Then calculate the conditional probability distribution P(c i |L), that is, for each feature c i Given the label L, the probability distribution of each feature, assuming c i If it satisfies the normal distribution, then: Where μ is the characteristic c i The mean under label L, σ is the standard deviation, and exp(g) is the exponential function; since the features are conditionally independent, the probability of each feature depends only on the label, then the formula for the joint conditional probability distribution P(C|L) is: Then calculate the partial conditional probability P partial (L), that is, the partial label probability of the sample for the category, whose probability value is 0 or 1; Step S2.4: Calculate the posterior probability according to Bayes' theorem, combining the prior probability P(L) and conditional probability P(C|L) in step 3 and the partial conditional probability P partial (L) solves the posterior probability P(L||C,P partial ), since the features are conditionally independent, the theorem can be simplified to: Among them, L′ represents a certain label, and finally the posterior probability of each candidate label of each sample is used as the label confidence to form a label confidence matrix.

3. The Bayesian network and rough set feature selection method for pneumonia etiology diagnosis according to claim 1 is characterized in that: The step S3 comprises the following steps: Step S3.1: Construct neighborhood granularity. First, we construct a sample set U = {x1, x2, x3, ..., x i ,...x m The feature set C = {c1,c2,c3,...,c i ,...,c n }Calculate the dynamic threshold, where x i is the i-th sample, x m is the mth sample, m is the number of samples, and the neighborhood threshold δ B It is defined as a weighted combination of the standard deviations of the features of feature subset C, and the formula is as follows: Among them, σ(c) represents the standard deviation of feature c, represents the mean of feature c, |C| is the total number of features, and |g| represents the number of elements in the set. This formula measures the discreteness of each feature through the ratio of the standard deviation to the mean and adaptively adjusts the neighborhood threshold to adapt to the differences between features; Next, define the sample x i In feature subset Neighborhood δ B (x i ) δ B (x i )={x j ∣∣Δ B (x i ,x j )≤δ B ,x i ,x j ∈U} (6) where Δ B (x i ,x j ) is the sample x i and x j The Euclidean distance on feature subset B, x i is the i-th sample, x j is the jth sample, δ B is the neighborhood threshold; Finally, the neighborhood relationship matrix R is obtained, and the matrix element R ij Satisfy the following rules: Step S3.2: Generate equivalence classes according to the label confidence matrix in step 2, that is, directly generate equivalence classes by selecting the maximum confidence each time; Step S3.2.1: Let the label set L = {L1, L2, L3, ... L i ,...,L k }, where L i is the i-th decision label, L k is the kth decision label, k is the number of labels, and the label confidence matrix P = [p ij ], where p ij Represents sample x i Belongs to label L j The confidence level, L j is the jth decision label, And satisfy: Step S3.2.2: For each sample x i The sample x is divided according to its maximum confidence label in the confidence matrix P. i The label is determined by the following formula: where argmax(g) represents p ij When the input j reaches the maximum value, for label L j , equivalence class Defined as: Step S3.3: Construct upper and lower approximate sets based on neighborhood granularity and equivalence classes and calculate the dependency. Step S3.3.1: In the dynamic neighborhood threshold δ B Under the action of , the upper and lower approximate sets are defined based on the neighborhood relationship of the samples. For the equivalence class under the feature subset B Lower approximation set Indicates that all the neighbors in B completely belong to the equivalence class The sample set is defined as follows: Upper approximation set It represents the set of samples in which at least some samples in the neighborhood of feature subset B belong to the equivalence class, and is defined as follows: Step S3.3.2: Positive Domain POS B (U) is the set of all samples that can be accurately divided into equivalence classes, which is defined as: Dependence Dep(B,U) represents the classification ability of feature subset B on sample set U, which is defined as:

4. The Bayesian network and rough set feature selection method for pneumonia etiology diagnosis according to claim 1, characterized in that: The step S4 comprises the following steps: Step S4.1: Calculate the significance of feature c k ∈C, whose significance is defined as adding feature c k The increment of the dependency after: σ(c k ,B)=Dep(B∪{c k },U)-Dep(B,U) (15) Significant representation feature c k The classification contribution to the current feature subset B, when feature c k The significance of σ(c k ,B)=0, remove it from the candidate feature set, otherwise add it to the candidate set; Step S4.2: Redundancy is used to evaluate the repeated information between features. For feature c j ∈C, redundancy R(c i ,c j ) is defined as: Among them, i(c i ;c j ) represents feature c i and c j The mutual information, H(c i ) represents feature c i The entropy of the feature map is , and the redundancy reflects the degree of information overlap between features; the mutual information I(c i ;c j ) is used to measure two features c i and c i The correlation or information sharing degree between them is calculated as follows: Among them, p(x,y) represents c i and c i The probability of taking values ​​of x and y at the same time, p(x), p(y) are c i and c i The marginal probability distribution of i ) represents a single feature c i The degree of uncertainty is defined as: If the redundancy R(c i ,c j ) exceeds the set threshold of 0.9, and determines that c i With c i If there is high redundancy between them, the redundant features are deleted, and the optimized feature subset is finally obtained through the joint analysis of significance and redundancy; Step S4.3: Through the joint analysis of significance and redundancy, the optimized feature subset is finally obtained.

Citation Information

Patent Citations

  • Method for judging traditional Chinese medicine syndromes based on improved Bayesian statistics

    CN110970129A

  • Pulmonary nodule segmentation method, system and device based on weak supervision and medium

    CN118097151A

  • Class sharing semi-supervised feature selection method for depression brain image

    CN118470373A

  • Inference device for executing inference by bayesian network, and program for attaining the inference device

    JP2011203996A

  • Medical systems, devices and methods

    US20170173262A1

Cited By

  • Neighborhood rough set attribute reduction method for eye disease image diagnosis

    CN120431353A