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

Through the Bayesian network and rough set feature selection method, the problems of symptom overlap and data redundancy in the diagnosis of pneumonia etiology were solved, the feature selection was optimized, the accuracy and efficiency of diagnosis were improved, the computational cost was reduced, and the reliability and generalization ability of the model were enhanced.

CN119742050BActive Publication Date: 2025-10-14NANTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies in the diagnosis of the cause of pneumonia have problems such as symptom overlap, label ambiguity, and data feature redundancy, resulting in high complexity of the diagnostic model and poor generalization ability, which makes it difficult to meet the actual clinical application needs.

Method used

The Bayesian network and rough set feature selection method is adopted. By constructing a Bayesian network to generate a label confidence matrix, the neighborhood rough set is combined to calculate the feature dependency and redundancy, the optimal feature set is screened out, and the feature selection process is optimized.

Benefits of technology

It improves the accuracy and efficiency of pneumonia etiology diagnosis, reduces computational costs, enhances the reliability and generalization ability of the model, and has important clinical application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119742050B_ABST
    Figure CN119742050B_ABST
Patent Text Reader

Abstract

The application provides a Bayesian network and rough set feature selection method for pneumonia cause diagnosis, and belongs to the technical field of medical information intelligent processing, and solves the technical problems of symptom overlap, label ambiguity and data feature redundancy in pneumonia cause diagnosis. The technical scheme comprises the following steps: S1, data preprocessing is performed on pneumonia data of a patient; S2, a Bayesian network is constructed with patient features and cause labels as nodes to solve the disambiguation problem of the cause labels, and a label confidence matrix is generated; S3, the dependency of each feature on the cause label is calculated based on a neighborhood rough set; and S4, the optimal feature set is screened by combining significance analysis and redundancy reduction. The application has the beneficial effect that the method takes the pneumonia diagnosis scene as an application background, can effectively deal with the patient cause complexity and data redundancy problem, improves the reliability and efficiency of diagnosis, reduces the calculation cost, and provides technical support for actual clinical diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent processing of medical information, and particularly to a Bayesian network and rough set feature selection method for pneumonia cause diagnosis. BACKGROUND

[0002] Pneumonia is one of the major diseases worldwide that leads to high morbidity and mortality, and common causes include bacterial infection, viral infection, and fungal infection. Pneumonia of different causes has significant differences in treatment strategies, and the accuracy of cause diagnosis directly determines the effectiveness of treatment. However, in actual clinical diagnosis, there are some technical difficulties in cause identification.

[0003] Pneumonia patients usually show similar clinical symptoms such as fever, cough, and dyspnea, which can be caused by multiple causes. For example, both viral and bacterial pneumonia can cause fever, and the patient's label may have overlap or ambiguity at the initial diagnosis. Traditional diagnostic methods rely on experience and are prone to misdiagnosis or missed diagnosis. Clinical diagnosis usually combines symptom description, laboratory tests such as white blood cell count, C-reactive protein, and imaging examinations such as chest X-ray or CT scan. These data have high dimensions and significant redundancy or noise.

[0004] For the diagnosis of 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 healthy, COVID-19, and bacterial pneumonia, and used a reweighting strategy to address the class imbalance problem, but did not consider the feature overlap between COVID-19 and bacterial pneumonia and did not significantly eliminate redundancy.

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

[0006] The present application aims to solve the technical problems of symptom overlap, label ambiguity and data feature redundancy in pneumonia etiology diagnosis, and provides a Bayesian network and rough set feature selection method for pneumonia etiology diagnosis, which is applied to the pneumonia diagnosis scene to accurately describe the etiology and avoid model overcomplication, can effectively deal with the complexity of patient etiology and data redundancy, improve the reliability and efficiency of diagnosis, and reduce the computing cost, providing technical support for actual clinical diagnosis.

[0007] The application idea of the present application is as follows: first, the pneumonia data of the patient is preprocessed; then, the patient features and etiology labels are taken as nodes to construct a Bayesian network to solve the disambiguation problem of etiology labels and generate a label confidence matrix; next, the dependency of each feature on the etiology label is calculated based on the neighborhood rough set; finally, the optimal feature set is selected by combining significance analysis and redundancy reduction.

[0008] The present application is realized by the following measures: the Bayesian network and rough set feature selection method for pneumonia etiology diagnosis comprises the following steps:

[0009] S1, collecting multi-modal data of pneumonia patients, including symptom data, laboratory test results and imaging examination features. First, for the missing test indicators of some patients, statistical methods are used for completion, and then data standardization is performed, that is, numerical features are normalized, and text features such as sputum color description are coded as categorical variables;

[0010] S2, constructing a Bayesian network, the nodes including input features and etiology labels, solving the overlap and ambiguity problem of patient etiology labels, and finally generating a label confidence matrix;

[0011] S3, constructing a neighborhood rough set model, dividing the patient samples into multiple neighborhoods, dividing the equivalence classes according to the label confidence matrix, calculating the feature dependency combining the neighborhood and equivalence classes, and taking it as the feature evaluation index;

[0012] S4, obtaining the significance of the feature according to the dependency, calculating the mutual information and conditional entropy to obtain the redundancy of the feature, and selecting the optimal feature subset according to the significance and redundancy.

[0013] Further, 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 features be C={c1,c2,c3,...,c i ,...,c n}, where c i is the i-th pneumonia feature, c nFor the nth pneumonia feature, n is the number of features, let L represent the random variable of the cause label, then introduce the partial conditional probability variable P partial , which represents the special relationship between the partial feature and the target label; then assume the relationship between the variables, since the label is generally determined by multiple features, it is assumed that the features have a direct impact on the label, and the features C are assumed to be conditionally independent, meaning that each feature is no longer related to each other after knowing the label L, and P partial is independent of the features, but is directly related to the label L;

[0015] Step S2.2: Build 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, the features C = {c1, c2, c3,..., c i ,..., c n} have a directed edge to the label L, indicating that the features affect the label, and there is no edge between the features, which are conditionally independent;

[0016] Step S2.3: Determine the conditional probability table of 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 without providing feature data;

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

[0020]

[0021] where μ is the mean of the feature c i under the label L, σ is the standard deviation, and exp(g) is the exponential function; since the features are conditionally independent, the probability of each feature only depends on the label, so the joint conditional probability distribution P(C|L) is:

[0022]

[0023] Then calculate the partial conditional probability P partial (L), which is the partial label probability of the sample to the class, and its 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 the conditional probability P(C|L) in the third step 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 the label confidence matrix.

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

[0028] Step S3.1: Construct neighborhood granularity. First, construct the sample set U = {x1, x2, x3, ..., x i ,...x m} 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:

[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 degree of dispersion 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 δ on B (x i )

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

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

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

[0035]

[0036] Step S3.2: generating equivalence classes according to the label confidence matrix in step 2, i.e., directly generating equivalence classes by selecting the maximum confidence each time;

[0037] 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 k-th decision label, k is the number of labels, and the label confidence matrix P = [p ij ] is obtained, where p ij represents the confidence of sample x i belonging to label L j , L j is the j-th decision label, and satisfy:

[0038]

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

[0040]

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

[0042]

[0043] Step S3.3: constructing upper and lower approximation sets and calculating dependency degrees according to neighborhood granularity and equivalence classes,

[0044] Step S3.3.1: Define the upper approximation set based on the neighborhood relation of samples under the dynamic neighborhood threshold δ B The upper approximation set denotes the set of samples that are completely in the equivalence class in the neighborhood of B, and is defined as follows:

[0045]

[0046] The upper approximation set denotes the set of samples that are at least partially in the equivalence class in the neighborhood of the feature subset B, and is defined as follows:

[0047]

[0048] Step S3.3.2: Positive region POS B (U) is the set of samples that can be accurately classified into the equivalence class, and is defined as:

[0049]

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

[0051]

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

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

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

[0055] The significance represents the classification contribution of the feature c k to the current feature subset B, when the significance σ(c k ,B) of the feature c k is 0, it is removed from the candidate feature set, otherwise it is added to the candidate set.

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

[0057]

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

[0059]

[0060] where p(x, y) represents the probability of c i and c i taking values of x and y at the same time, and p(x), p(y) are the marginal probability distributions of c i and c i , respectively; the entropy H(c i ) represents the uncertainty degree of a single feature c i , and is defined as follows:

[0061]

[0062] If the redundancy R(c i , c j ) exceeds the set threshold value 0.9, it is determined that there is a high redundancy between c i and c i , and the redundant feature is deleted; through the joint analysis of the significance and the redundancy, an optimized feature subset is finally obtained;

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

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

[0065] 1. The Bayesian network and rough set feature selection method for pneumonia cause diagnosis provided by the present application first generates a label confidence matrix according to part of known cause labels, calculates the correlation probability between labels through a Bayesian network, realizes dynamic elimination of cause labels, and forms more reliable label basic data. The method improves the accuracy and reliability of data in cause diagnosis, and lays a solid foundation for subsequent feature selection.

[0066] 2、The application proposes a redundant feature measurement method based on mutual information and entropy, which quantifies the redundancy between features, eliminates redundant features with low contribution to etiological diagnosis, and optimizes the composition of the feature set. This method effectively avoids the interference of redundant features on the diagnostic performance, and improves the generalization ability and running efficiency of the model.

[0067] 3、The application uses the synergy of saliency and redundancy to drive the feature selection strategy, which eliminates redundant features while selecting core features, and realizes the dynamic optimization of feature selection. This strategy improves the comprehensiveness and effectiveness of feature selection, significantly improves the accuracy and efficiency of pneumonia etiological diagnosis, and has important clinical application value. BRIEF DESCRIPTION OF DRAWINGS

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

[0069] Fig. 1 The application is a Bayesian network and rough set feature selection method for pneumonia etiological diagnosis.

[0070] Fig. 2 The application is a Bayesian network and rough set feature selection method for pneumonia etiological diagnosis.

[0071] Fig. 3 The application is a pneumonia feature reduction method based on dynamic neighborhood rough set. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical scheme and advantages of the application clearer, the application will be further described in detail below in combination with the drawings and examples. Of course, the specific examples described here are only used to explain the application, and do not limit the application.

[0073] Example 1

[0074] Referring to Figs. 1 to 3 The application provides a Bayesian network and rough set feature selection method for pneumonia etiological diagnosis, including the following steps:

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

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

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

[0078] S4, derive the significance of the features according to the dependency degree, calculate the mutual information and conditional entropy to obtain the redundancy of the features, and select the optimal feature subset according to 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, wherein U = {x1, x2, …, x 10} indicates that there are a total of 10 samples in this embodiment, C = {c1, c2, …, c5} indicates the data features of pneumonia, and L = {L1, L2, L3} indicates 3 decision labels.

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

[0084] Step S2.1: define the relationship between variables, according to the pneumonia data set, first let the random variable representing the symptoms, laboratory indicators and other features be C = {c1, c2, c3, …, c i ,...,c n}, wherein c i is the i th pneumonia feature, c n is the n th pneumonia feature, n is the number of features, let the random variable representing the etiology label be L, then introduce additional conditional probability variables P partial , representing the special relationship between part of the 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 features have a direct impact on the label, the features C are assumed to be conditionally independent, meaning that each feature is no longer related to each other after knowing the label L, and P partial is independent of the features, but is directly related to the label L;

[0085] Step S2.2: construct the graph structure of the Bayesian network, define the variables as nodes, according to the relationship between the variables defined in the first step, the features C = {c1, c2, c3, …, c i..., c n There are directed edges pointing to the labels L, indicating that the features will affect the labels, and there are no edges between the features, which are conditionally independent;

[0086] Step S2.3: Determine the conditional probability table of each node, representing 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 without providing feature data; thus, the prior probability of each label L is shown in Table 2 as follows:

[0089] Table 2

[0090]

[0091] Next, calculate the conditional probability distribution P(c i | L) of each feature, that is, for each feature c i The probability distribution of each feature under the condition of a given label L, assuming that c i satisfies a normal distribution, then:

[0092]

[0093] Where μ is the mean of feature c i 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 only depends on the label, so the joint conditional probability distribution P(C|L) formula is:

[0094]

[0095] In this example, due to the independence of the features, after calculating the normal distribution, the joint conditional probability P(C|L) can be obtained by multiplying the probabilities as shown in Table 3:

[0096] Table 3

[0097]

[0098] Then calculate the partial conditional probability P paytial (l), which is the partial label probability of the sample to the class, and its probability value is 0 or 1;

[0099] In this embodiment, the conditional probability of the partial label is shown in Table 4 as follows:

[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, construct the sample set U = {x1, x2, x3, ..., x i ,...x m} 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:

[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 degree of dispersion 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 δ on B (x i )

[0113] δ B (xi ) = {x j | ||Δ B (x i , x j ) | < δ B , x i , x j ∈ U} (6)

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

[0115] In this embodiment, the feature subset B = {c1, c 2, , c5}, and the distance matrix Δ B calculated according to the Euclidean distance is as follows:

[0116]

[0117] Finally, the neighborhood relation matrix R can be obtained, and the matrix element R ij satisfies the following rules:

[0118]

[0119] In this embodiment, the neighborhood threshold δ B = 0.5857 is calculated, and the neighborhood relation R ij on the feature subset B can be obtained in combination with the Euclidean distance and the neighborhood threshold, and the specific relation is as follows:

[0120]

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

[0122] 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 k-th decision label, k is the number of labels, and the label confidence matrix P = [p ij ] is obtained, where p ij represents that the sample x i belongs to the label L jthe confidence of x, L j is the jth decision label, and satisfies:

[0123]

[0124] Step S3.2.2: Each sample x i is classified according to its maximum confidence label in the confidence matrix P, x i The label of x is determined by the following formula:

[0125]

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

[0127]

[0128] In this embodiment, for the sample set U = {x1, x2,..., x8}, according to the above definition, the equivalence class classification result can be: E L1 = {x1, x5, x7}, E L2 = {x2, x4}, E L3 = {x3, x6, x8}.

[0129] Step S3.3: Constructing upper and lower approximation sets and calculating dependency degree according to neighborhood granularity and equivalence class,

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

[0131]

[0132] The upper approximation set represents all sample sets that at least partially belong to the equivalence class in the neighborhood of the feature subset B, and is defined as follows:

[0133]

[0134] In this embodiment, it can be obtained that the lower approximation sets of classes L1 and L2 are empty, and the lower approximation set of class L3 contains sample x3.

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

[0136]

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

[0138]

[0139] In this embodiment, according to the obtained lower approximation set, the positive region POS B (U) = 0 + 0 + 1 = 1, the dependency degree

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

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

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

[0143] The significance represents the classification contribution of the feature c k to the current feature subset B, when the significance σ(c k ,B) = 0, the feature c k is removed from the candidate feature set, otherwise it is added to the candidate set;

[0144] In this embodiment, if the added feature is c7, the current feature set is {c1, c2, c5, c7}, and Dep({c1, c2, c5, c7}, U) = 0.25 can be obtained, σ(c7, 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 the feature c j ∈ C, the redundancy R(c i ,c j ) is defined as:

[0146]

[0147] where I(c i ; c j ) represents the information of the feature c i and cj 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 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 the c of a single feature 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 c i with c i If there is high redundancy between features, 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 redundancy of feature c7 relative to the existing features {c1, c2, c5} is calculated, and the entropy of c7 is obtained as H(c7) = 1, the mutual information I(c7; c1) = 0, I(c7; c2) = 0.18872, and i(c7; c5) = 0, that is, the redundancy R(c7, c1) = 0, R(c7, c2) = 0.1887, and R(c7, c5) = 0, so it is concluded that 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 = {c1, c2, c5, c7} is finally obtained by combining significance and redundancy.

[0155] Example 2

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

[0157] 1. Traditional algorithm

[0158] Based on relevant research at home and abroad, this embodiment selects the following algorithms:

[0159] 1.1 Partial label selection algorithm

[0160] FSPF: Map the possibility of partial labels to a specific probability distribution through feature subspace, assume that each feature contributes to the distribution of partial labels in a certain subspace, and gradually optimize the probability distribution of label prediction in multi-dimensional space. Disadvantages: Modeling through subspace and latent space is easy to be affected by high-dimensional features or complex label distribution.

[0161] LSPF: Embed partial information of labels into a latent space, optimize the distribution prediction of labels by using the correlation between features, and learn the latent label distribution through high-dimensional mapping. Disadvantages: Similar to FSPF, the computational complexity is similar, and the running speed is slow in large-scale scenarios.

[0162] RDPF: Uses a randomized method to simplify the calculation of the dependence between features directly, and uses a specific random dependence function to predict the label distribution. Disadvantages: Simplify the calculation by relying on random functions, and lack of accurate description of the relationship between features and labels.

[0163] PFFL: A forward step-by-step learning method is used to iteratively optimize the distribution of partial labels, and special attention is paid to the importance of partial features, which are directly related to the label distribution. Disadvantages: The importance of features needs to be learned step by step, and the effect of step-by-step learning may be affected when the proportion of missing labels is high.

[0164] 1.2 Feature selection algorithm

[0165] NMI_mRMR: A feature selection method combining neighborhood rough set theory and mutual information theory, mainly used for feature selection of high-dimensional data sets, based on the mRMR framework, both maximizing the correlation between features and target variables and minimizing the redundancy between features. Disadvantages: Due to the need to calculate the neighborhood mutual information between features and targets and features, the calculation is large, especially on high-dimensional data sets, and more emphasis is placed on local neighborhood feature analysis, which may ignore global pattern information.

[0166] FARNEM: Using neighborhood rough set theory, combined with forward selection strategy, that is, according to the importance of the characteristics of the target variable, the optimal features are added step by step, and redundant features are removed during the forward addition process to ensure the simplicity of the final feature set. Disadvantages: First, the setting of neighborhood radius will directly affect the calculation of dependence, and the quality of the initial feature ranking will significantly affect the final selection results. And because of the use of forward selection strategy, the algorithm may stagnate at a local optimum, resulting in the feature set not reaching the global optimum.

[0167] 2. Comparison index

[0168] This embodiment is used for feature selection task. Classification accuracy is an important indicator to evaluate feature selection method. By using different classification models on the same data set, the effect of feature selection is tested, and the change of classification performance is observed. We use support vector machine (SVM), random forest (RF), and K nearest neighbor algorithm (KNN) to evaluate.

[0169] SVM: It is good at processing high-dimensional data and nonlinear classification problems. Its classification performance depends largely on the discriminability of features. Whether 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 natural feature importance evaluation ability. Its classification accuracy can reflect the improvement of feature selection on the overall performance of the model, and also show the effect of removing feature redundancy.

[0171] KNN: It is an instance-based classification method, which is very sensitive to the dimension change of feature space. It can observe whether feature selection can improve the classification performance of KNN and verify whether dimension reduction optimizes the feature space.

[0172] 3. Comparison results

[0173] From the data, it can be seen that the embodiment performs well in evaluation index, which is significantly better than other models. In the partial label disambiguation based on Bayesian network, the accuracy rate using Bayesian network reaches 92.3%, which is better than other algorithms, 2.1% higher than PFFL, and 6.7% higher than FSPF and LSPF respectively. This shows that Bayesian network better models the relationship between labels through conditional probability distribution. In terms of time complexity, the theoretical complexity of the embodiment is better than O(n(n+d+L)) of FSPF and LSPF, especially when the sample number n is large. The effect is more significant. Although RDPF has the lowest time complexity, the accuracy rate is only 79.4%, which cannot meet the demand of practical application.

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

[0175] Table 6 Comparison table of the embodiment and other part label selection

[0176]

[0177] Table 7 Comparison table of the embodiment and other feature selection algorithms

[0178]

[0179] The above only describes exemplary embodiments of the present application, and does not limit the patent protection scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A Bayesian network and rough set feature selection method for pneumonia etiology diagnosis, characterized by: The following steps are involved: S1. Collect multimodal data from pneumonia patients, including symptom data, laboratory test results, and imaging examination features. First, statistical methods are used to complete the missing test indicators for some patients. Then, data standardization is performed, that is, numerical features are normalized, and text features such as sputum color descriptions are encoded as categorical variables. S2. Construct a Bayesian network whose nodes include input features and etiology labels, resolve the overlap and ambiguity of patient etiology labels, and finally generate a label confidence matrix; The step S2 comprises the following steps: Step S2.1: Define the relationship between variables. According to the pneumonia dataset, 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 features, but directly related to 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 the 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(·) is the exponential function. Since the features are conditionally independent, the probability of each feature depends only on the label. 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 the conditional probability P(C|L) in the third step 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 the label confidence matrix; S3. Construct a neighborhood rough set model to divide patient samples into multiple neighborhoods, divide them into equivalence classes based on the label confidence matrix, calculate feature dependencies based on the neighborhoods and equivalence classes, and use them as feature evaluation indicators. S4. Determine the significance of the feature based on the dependency, calculate the mutual information and conditional entropy to obtain the redundancy of the feature, and select the optimal feature subset 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 S3 comprises the following steps: Step S3.1: Construct neighborhood granularity. First, construct the sample set U = {x1, x2, x3, ..., x i ,...x m } 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 |·| represents the number of elements in the set. This formula measures the discreteness of each feature by 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 δ on B (x i ) δ B (x i )={x j ∣∣Δ B (x i ,x j )≤δ B ,x i ,x j ∈U} (6) 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; Finally, the neighborhood relationship matrix R is obtained, and the matrix element R ij Satisfy the following rules: Step S3.2: Generate equivalence classes based on 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(·) 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, and 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: The dependency Dep(B, U) represents the classification ability of the feature subset B on the sample set U, which is defined as:

3. The Bayesian network and rough set feature selection method for pneumonia etiology diagnosis according to claim 1 is 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 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: Where 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 the c of a single feature 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 c i with c i If there is high redundancy between features, 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