A method for arrhythmia classification based on ensemble learning feature selection
Through the arrhythm classification method based on integrated learning feature selection, combined with multiple feature selection methods and Bagging integrated learning algorithm, the problems of time-consuming, labor-intensive and high computational complexity in manual judgment in traditional ECG analysis are solved, and more efficient heart rhythm is achieved Abnormal classification.
Patent Information
- Application Number
- CN202411150418.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-08-21
AI Technical Summary
Traditional ECG analysis requires manual judgment, which is time-consuming and labor-intensive and prone to human errors. The arrhythm classification method based on machine learning is sensitive to data noise, is easy to overfit, requires a large amount of data, and has high computational complexity.
Using arrhythmia classification method based on integrated learning feature selection, the electrocardiogram data set is divided into 4 mutually exclusive subsets through Stratified KFold hierarchical K-fold cross-validation, using MI, CMI, JMI and mRMR feature selection methods, combined with Bagging integrated learning Algorithms and random forest classifiers reduce system computing time and computational complexity.
The problem of a single MI method being sensitive to data noise, being susceptible to overfitting and requiring a large amount of data is overcome, the performance and calculation efficiency of arrhythmia classification are improved, and the overall computational complexity of the system is reduced.
Smart Images

Figure CN118656795B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of arrhythmia classification, and in particular to an arrhythmia classification method based on ensemble learning feature selection. Background Art
[0002] Electrocardiogram (ECG) is a simple, safe and non-invasive examination method for recording cardiac electrical activity and is widely used in clinical medicine. Most CVDs can be prevented and detected based on ECG data. However, traditional ECG analysis requires manual judgment and diagnosis by experts, which is not only time-consuming and labor-intensive, but also occupies a large amount of medical resources and is prone to human errors. In recent years, with the rapid development of artificial intelligence technology, the use of machine learning technology for arrhythmia classification has received widespread attention. It has become a powerful method for classifying arrhythmias using ECG signals, providing a new idea for helping medical staff make accurate diagnoses and improve clinical efficiency. The main challenge of arrhythmia classification is to select features that can accurately identify abnormal heartbeat changes that lead to CVD.
[0003] However, in the past few years, the feature domain has expanded from dozens of variables to hundreds of variables in machine learning-based heart rhythm classification applications. Therefore, scholars have developed several technical means to solve the problem of reducing irrelevant and redundant features. Feature selection helps to understand the data, reduce computational requirements and the impact of the curse of dimensionality, and improve predictor performance. After years of development, there are mainly several methods for implementing feature selection methods: Mutual Information (MI), Conditional Mutual Information (CMI), Joint Mutual Information (JMI) and Minimum Redundancy Maximum Relevance (mRMR). Among the above-mentioned methods for implementing feature selection, some solutions are very sensitive to data noise, some solutions have the risk of overfitting, and some solutions require a large amount of data.
[0004] In order to solve the above-mentioned feature selection problem and improve the performance of arrhythmia classification, this paper proposes an arrhythmia classification method based on ensemble learning feature selection (ELFS), which provides a new idea for the research of biomedical signal classification methods. Summary of the invention
[0005] The present invention overcomes the defects of the prior art and provides an arrhythmia classification method based on ensemble learning feature selection. Its important purpose is to overcome the shortcomings of the single MI method, which is very sensitive to data noise, easy to overfit, and requires a large amount of data, and to reduce the system operation time and computational complexity.
[0006] To achieve the above-mentioned purpose, the present invention provides a method for classifying arrhythmias based on ensemble learning feature selection, comprising:
[0007] Acquire electrocardiogram data and form an electrocardiogram data set, and divide the electrocardiogram data set into four mutually exclusive subsets of equal proportions of sample categories according to the StratifiedKFold stratified K-fold cross-validation method;
[0008] The MI, CMI, JMI and mRMR feature selection methods are used to select the four mutually exclusive subsets to form a sample set. ;
[0009] Using weak selector learning algorithm In the sample set Training a weak selector , using the Bagging ensemble learning algorithm for weak selectors Combine the output results of to obtain the final strong selector and output the best feature group;
[0010] A random forest classifier is constructed based on the random forest algorithm, the random forest classifier is trained according to the optimal feature group, and the prediction category is determined using the majority voting principle.
[0011] In this solution, the electrocardiogram data is obtained and an electrocardiogram data set is formed. The electrocardiogram data set is divided into four mutually exclusive subsets of equal proportions of sample categories according to the StratifiedKFold stratified K-fold cross-validation method, specifically including:
[0012] The sample categories in the four mutually exclusive subsets have the same ratio as that in the electrocardiogram dataset.
[0013] In this scheme, the four mutually exclusive subsets are processed by MI, CMI, JMI and mRMR feature selection methods to form a sample set. , specifically including:
[0014] Information entropy, joint entropy and conditional entropy are used to express MI, CMI and JMI. The specific expression formula is as follows:
[0015] ;
[0016] ;
[0017] ;
[0018] in, , , is a discrete random variable, , They are , The information entropy of is the conditional entropy, which means that given under conditions uncertainty, Indicates that in a given Under the conditions uncertainty, Indicates that in a given Under the conditions uncertainty, For a given and The conditional entropy under the joint condition of and Under the conditions uncertainty, MI, indicating that the given Under the conditions Reduction of uncertainty, For a given Under the conditions Reduction of uncertainty, For a given Under the conditions Reduction of uncertainty, is CMI, which means that in a given Under the conditions of lead to Uncertainty is reduced, Indicates that in a given Under the conditions of Caused by Uncertainty is reduced, Indicates that in a given Under the conditions of Caused by Uncertainty is reduced, JMI means that in a given Under the conditions Reduction of uncertainty.
[0019] In this scheme, the four mutually exclusive subsets are processed by MI, CMI, JMI and mRMR feature selection methods to form a sample set. , also includes:
[0020] The maximum relevant information criterion and the minimum redundancy condition are used for feature selection. The maximum relevant information criterion is as follows:
[0021] ;
[0022] in, yes The number of features in the space, It is an individual characteristic and The mutual information between
[0023] The minimum redundancy conditions are as follows:
[0024] ;
[0025] in, It is a feature and Features The mutual information between them.
[0026] In this scheme, the weak selector learning algorithm is used In the sample set Training a weak selector , using the Bagging ensemble learning algorithm for weak selectors The output results of are combined to obtain the final strong selector, and the optimal feature group is output, including:
[0027] Using weak selector learning algorithm In the sample set Training a weak selector ,in , ;
[0028] in, is the sample set processed by the MI algorithm, is the sample set processed by the CMI algorithm, is the sample set processed by the JMI algorithm, is the sample set processed by the mRMR algorithm;
[0029] Use majority voting rules for weak selectors The output results are combined.
[0030] In this solution, the random forest classifier is constructed based on the random forest algorithm, the random forest classifier is trained according to the best feature group, and the prediction category is determined by the majority voting principle, which specifically includes:
[0031] Several decision tree models The random forest classifier is constructed by integration, where are independent random vectors with the same distribution;
[0032] Set the margin function and generalization error, use the majority voting principle to determine the prediction category, and get the final output ;
[0033] The marginal function is:
[0034] ;
[0035] in, is the indicator function;
[0036] The generalization error is:
[0037] ;
[0038] in, and Yes means A random vector of spatial probabilities, Represents the marginal function measure.
[0039] In this solution, the step of training the random forest classifier according to the optimal feature group includes:
[0040] Building a training data set based on the optimal feature set, and randomly selecting a sample from the training data set;
[0041] Generate a decision tree based on the selected random sample, and perform node segmentation based on the best segmentation in a random subset of the input variables, where the random subset is a tuning parameter of the random forest algorithm;
[0042] Repeat the above steps until C trees are grown.
[0043] The second aspect of the present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes an arrhythmia classification method program based on ensemble learning feature selection, and when the arrhythmia classification method program based on ensemble learning feature selection is executed by a processor, the steps of the arrhythmia classification method based on ensemble learning feature selection as described in any one of the above items are implemented.
[0044] The present invention provides an arrhythmia classification method based on ensemble learning feature selection, which integrates the feature selection characteristics of four MI methods through the majority voting method of Bagging ensemble learning, overcoming the shortcomings of a single MI method such as being very sensitive to data noise, easy to overfit, and requiring a large amount of data. At the same time, the ECG data is divided into four parts for feature selection, which further reduces the system's operation time and reduces the overall computational complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments or exemplary embodiments of the present invention, the drawings required for use in the embodiments or exemplary descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained according to the drawings without paying creative work.
[0046] Figure 1 A flow chart of an arrhythmia classification method based on ensemble learning feature selection provided by one embodiment of the present invention;
[0047] Figure 2 A schematic diagram of a feature ensemble learning algorithm in ELFS provided in one embodiment of the present invention;
[0048] Figure 3 A diagram of an RF construction process provided by an embodiment of the present invention;
[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0051] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0052] Figure 1 A flow chart of an arrhythmia classification method based on ensemble learning feature selection provided by one embodiment of the present invention;
[0053] like Figure 1 As shown, the present invention provides a flow chart of an arrhythmia classification method based on ensemble learning feature selection, comprising:
[0054] S102, acquiring electrocardiogram data and forming an electrocardiogram data set, and dividing the electrocardiogram data set into four mutually exclusive subsets of equal proportions of sample categories according to a StratifiedKFold stratified K-fold cross-validation method;
[0055] S104, MI, CMI, JMI and mRMR feature selection methods are used to perform feature selection on the four mutually exclusive subsets to form a sample set ;
[0056] S106, using weak selector learning algorithm In the sample set Training a weak selector , using the Bagging ensemble learning algorithm for weak selectors Combine the output results of to obtain the final strong selector and output the best feature group;
[0057] S108, constructing a random forest classifier based on the random forest algorithm, training the random forest classifier according to the optimal feature group, and determining the prediction category using the majority voting principle.
[0058] It should be noted that the present invention provides an arrhythmia classification method based on ensemble learning feature selection, by dividing the ECG data set into 4 mutually exclusive subsets of equal proportions of sample categories, performing feature selection on each data set, sending the obtained 4 sets of feature sets into Bagging ensemble learning for voting, obtaining a set of optimal feature sets through voting, and finally sending this set of feature sets to Random Forest classifier (RF) for arrhythmia classification. Bagging ensemble learning integrates the feature selection characteristics of 4 MI methods, overcoming the shortcomings of a single MI method in being very sensitive to data noise, easy to overfit, and requiring a large amount of data. At the same time, the ECG data is divided into 4 parts for feature selection, which further reduces the operation time of the system and reduces the overall computational complexity.
[0059] Further, in a preferred embodiment of the present invention, the electrocardiogram data is obtained and an electrocardiogram data set is formed, and the electrocardiogram data set is divided into four mutually exclusive subsets of equal proportions of sample categories according to the StratifiedKFold stratified K-fold cross-validation method, specifically including:
[0060] The sample categories in the four mutually exclusive subsets have the same ratio as that in the electrocardiogram dataset.
[0061] It should be noted that the electrocardiogram data of the MIT-BIH arrhythmia database is used to construct an electrocardiogram data set, and the data set is divided into 4 mutually exclusive subsets by using the StratifiedKFold hierarchical K-fold cross-validation method, and the sample category ratio in each subset is the same as the category ratio in the entire data set. In addition, the present invention considers 85 features in total, including: beat-to-beat (RR) interval, discrete wavelet transform (DWT) coefficient, Hermite basis function (HBF) expansion coefficient, high-order statistics (HOS), amplitude difference, Euclidean distance and time characteristics of ventricular depolarization wave (QRS complex). And also includes the features caused by the normalization of the RR interval, the amplitude difference and the QRS time characteristics.
[0062] Further, in a preferred embodiment of the present invention, the four mutually exclusive subsets are processed by feature selection using MI, CMI, JMI and mRMR feature selection methods to form a sample set. , specifically including:
[0063] Information entropy, joint entropy and conditional entropy are used to express MI, CMI and JMI. The specific expression formula is as follows:
[0064] ;
[0065] ;
[0066] ;
[0067] in, , , is a discrete random variable, , They are , The information entropy of is the conditional entropy, which means that given under conditions uncertainty, Indicates that in a given Under the conditions uncertainty, Indicates that in a given Under the conditions uncertainty, For a given and The conditional entropy under the joint condition of and Under the conditions uncertainty, MI, indicating that the given Under the conditions Reduction of uncertainty, For a given Under the conditions Reduction of uncertainty, is CMI, which means that in a given Under the conditions of lead to Uncertainty is reduced, Indicates that in a given Under the conditions of Caused by Uncertainty is reduced, Indicates that in a given Under the conditions of Caused by Uncertainty is reduced, JMI means that in a given Under the conditions Reduction of uncertainty.
[0068] Specifically, assuming is a discrete random variable, . The information entropy of , its definition is as follows:
[0069] ;
[0070] in Represents a random variable The probability of , and the base of the logarithm is 2. Assume is a discrete random variable, . A pair of discrete random variables The joint entropy of is expressed as follows:
[0071] ;
[0072] in Represents conditional entropy. Information theory also includes several measurement methods for calculating the amount of information between variables. Based on the above information entropy, we mainly introduce four measurement methods (MI, CMI, JMI and mRMR).
[0073] Consider the random variable and , mutual information Indicates a given Under the conditions Reduction of uncertainty, It can be expressed using entropy and conditional entropy as follows:
[0074] ;
[0075] set up is a discrete random variable. We can also use information entropy to represent CMI as follows:
[0076] ;
[0077] in Indicates that in a given Under the condition of Caused by Less uncertainty. is given and There are also two metrics that can be used to represent JMI, which quantifies the Under the conditions The reduction in uncertainty is as follows:
[0078] ;
[0079] According to formula (5), MI, CMI, JMI and information entropy can be expressed mutually. Entropy, conditional entropy and joint entropy can also be expressed mutually.
[0080] Further, in a preferred embodiment of the present invention, the four mutually exclusive subsets are processed by feature selection using MI, CMI, JMI and mRMR feature selection methods to form a sample set. , also includes:
[0081] The maximum relevant information criterion and the minimum redundancy condition are used for feature selection. The maximum relevant information criterion is as follows:
[0082] ;
[0083] in, yes The number of features in the space, It is an individual characteristic and The mutual information between
[0084] The minimum redundancy conditions are as follows:
[0085] ;
[0086] in, It is a feature and Features The mutual information between them.
[0087] It should be noted that the mRMR method aims to minimize the correlation between each feature and maximize the correlation between variables and attributes. The maximum correlation criterion can be used to obtain the highest correlation. Subsets, but the features selected by the maximum correlation criterion may be redundant. Therefore, it is necessary to use the minimum redundancy condition to select mutually exclusive features. It is a feature and Features The purpose is to remove highly dependent features and minimize the redundancy between features. The mRMR algorithm is a combination of maximum correlation and minimum redundancy, achieving the maximum correlation between variables and the minimum correlation between each feature.
[0088] Furthermore, in a preferred embodiment of the present invention, the weak selector learning algorithm is used In the sample set Training a weak selector , using the Bagging ensemble learning algorithm for weak selectors The output results of are combined to obtain the final strong selector, and the optimal feature group is output, including:
[0089] Using weak selector learning algorithm In the sample set Training a weak selector ,in , ;
[0090] in, is the sample set processed by the MI algorithm, is the sample set processed by the CMI algorithm, is the sample set processed by the JMI algorithm, is the sample set processed by the mRMR algorithm;
[0091] Use majority voting rules for weak selectors The output results are combined.
[0092] Furthermore, in a preferred embodiment of the present invention, the random forest classifier is constructed based on the random forest algorithm, the random forest classifier is trained according to the best feature group, and the prediction category is determined by the majority voting principle, which specifically includes:
[0093] Several decision tree models The random forest classifier is constructed by integration, where are independent random vectors with the same distribution;
[0094] Set the marginal function and generalization error, use the majority voting principle to determine the prediction category, and get the final output ;
[0095] The marginal function is:
[0096] ;
[0097] in, is the indicator function;
[0098] The generalization error is:
[0099] ;
[0100] in, and Yes means A random vector of spatial probabilities, Represents the marginal function measure.
[0101] It should be noted that the RF constructed is An ensemble of trees , ,..., ,in is a dimensional input vector. The ensemble generates Output , ,..., . is the decision tree number The outputs of these randomly generated trees are aggregated to obtain a final prediction , which is the average value of all trees in the forest. Training samples are generated For each tree in the forest, a new training set is created by bootstrapping, and then a decision tree is fully grown using this training set without pruning. At each node split in the decision tree, only a small number of features as input variables instead of all features, which is called random feature selection. This process is repeated to create decision trees to form a randomly generated forest.
[0102] Furthermore, in a preferred embodiment of the present invention, the step of training the random forest classifier according to the optimal feature set includes:
[0103] Building a training data set based on the optimal feature set, and randomly selecting a sample from the training data set;
[0104] Generate a decision tree based on the selected random sample, and perform node segmentation based on the best segmentation in a random subset of the input variables, where the random subset is a tuning parameter of the random forest algorithm;
[0105] Repeat the above steps until C trees are grown.
[0106] It should be noted that RF is implemented using the RandomForestClassifier class from the Scikit-learn package in Python. At each node, the best split from a random subset of the input variables is selected, and this random subset is the tuning parameter of the random forest algorithm. Until the tree is fully grown, no further splits can be made and no pruning is performed. At the same time, the only parameter explored is the number of trees, and all other parameters are kept at their default values. Classifiers with different numbers of trees are trained using the best feature set and their performance in terms of accuracy is observed.
[0107] Figure 2 Schematic diagram of a feature ensemble learning algorithm in ELFS provided in one embodiment of the present invention:
[0108] like Figure 2 As shown, in the schematic diagram of the feature ensemble learning algorithm in the ELFS provided by the present invention, specifically;
[0109] Based on the given sample set: ,in represents a set of ECG signal features after feature selection, express First, the ECG dataset is divided into 4 parts. is the sample set processed by the MI algorithm, is the sample set processed by the CMI algorithm, is the sample set processed by the JMI algorithm, is the sample set processed by the mRMR algorithm.
[0110] Use weak selector learning algorithm respectively In the sample set Training a weak selector ,in .
[0111] ;
[0112] Weak selector In the current integrated system middle:
[0113] ;
[0114] ;
[0115] Among them, the integrated system For new sample features 's selection result.
[0116] Finally, for a new set of sample features , using majority voting rule for integrated systems The output of each weak selector is combined to get the final strong selector:
[0117] ;
[0118] Based on the simple and effective Bagging ensemble learning algorithm, an efficient and strong feature selector is formed by combining MI, CMI, JMI, mRMR and Bagging algorithms. Thus, the feature selection characteristics of the four MI methods are integrated, overcoming the shortcomings of the single MI method such as being very sensitive to data noise, easy to overfit, and requiring a large amount of data, and having good feasibility and practical value.
[0119] Figure 3 A diagram of an RF construction process provided by an embodiment of the present invention;
[0120] like Figure 3 As shown in the RF construction process diagram provided by the present invention, specifically:
[0121] The Random Forest (RF) algorithm is used as the classifier of ECG signals. Several decision tree models are combined in parallel and the final result is determined according to the majority voting principle. The model is defined as follows:
[0122] RF is composed of several decision tree models An integrated classifier is constructed, where are independent random vectors with the same distribution. Input samples into RF , and get the final output Each tree uses the training set and a random vector Grow and input vector Vote for the most popular category on .
[0123] The marginal function is defined as:
[0124] ;
[0125] in is the indicator function.
[0126] In the RF algorithm, the generalization error is given by:
[0127] ;
[0128] in, and Yes means A random vector of spatial probabilities, represents the marginal function measure, i.e., the degree to which the average number of votes for a random vector on the correct output exceeds the average number of votes for any other output.
[0129] RF construction process is as follows Figure 3 As shown, the RF constructed is composed of An ensemble of trees , ,..., ,in is a dimensional input vector. The ensemble generates Output , ,..., . is the decision tree number The outputs of these randomly generated trees are aggregated to obtain a final prediction , which is the average value of all trees in the forest. Training samples are generated For each tree in the forest, a new training set is created by bootstrapping, and then a decision tree is fully grown using this training set without pruning. At each node split in the decision tree, only a small number of features as input variables instead of all features, which is called random feature selection. This process is repeated to create decision trees to form a randomly generated forest.
[0130] Furthermore, the training process of the randomly generated forest is as follows:
[0131] Randomly select a sample from the training data set. Grow a tree for each random sample with the following modifications: At each node, select the best split from a random subset of the input variables, where the random subset is the tuning parameter of the random forest algorithm. Continue until the tree is fully grown, no further splits can be made, and no pruning is performed. Repeat the above steps until C trees have been grown.
[0132] RF is implemented using the RandomForestClassifier class from the Scikit-learn package in Python. At each node, the best split from a random subset of the input variables is chosen, which is a tuning parameter of the random forest algorithm. No further splits can be made and no pruning is performed until the tree is fully grown. Meanwhile, the only parameter explored is the number of trees, all other parameters are kept at their default values. Classifiers with different numbers of trees are trained using the best set of features and their performance in terms of accuracy is observed.
[0133] The second aspect of the present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes an arrhythmia classification method program based on ensemble learning feature selection, and when the arrhythmia classification method program based on ensemble learning feature selection is executed by a processor, the steps of the arrhythmia classification method based on ensemble learning feature selection as described in any one of the above are implemented.
[0134] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0135] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0136] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0137] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0138] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0139] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for classifying arrhythmias based on ensemble learning feature selection, characterized in that: include: Acquire electrocardiogram data and form an electrocardiogram data set, and divide the electrocardiogram data set into four mutually exclusive subsets of equal proportions of sample categories according to the StratifiedKFold stratified K-fold cross-validation method; The MI, CMI, JMI and mRMR feature selection methods are used to select the four mutually exclusive subsets to form a sample set. ; Using weak selector learning algorithm In the sample set Training a weak selector , using the Bagging ensemble learning algorithm for weak selectors Combine the output results of to obtain the final strong selector and output the best feature group; Constructing a random forest classifier based on the random forest algorithm, training the random forest classifier according to the best feature group, and determining the prediction category using the majority voting principle; in , is the sample set processed by the MI algorithm, is the sample set processed by the CMI algorithm, is the sample set processed by the JMI algorithm, is the sample set processed by the mRMR algorithm; Information entropy, joint entropy and conditional entropy are used to represent MI, CMI and JMI mutually; Assumptions is a discrete random variable, , The information entropy of , its definition is as follows: in Represents a random variable The probability of, and the base of the logarithm is 2, assuming is a discrete random variable, ; A pair of discrete random variables The joint entropy of is expressed as follows: in represents conditional entropy; Consider the random variable and , mutual information Indicates a given Under the conditions Reduction of uncertainty, It can be expressed as follows using entropy and conditional entropy: set up As a discrete random variable, CMI is represented by information entropy as follows: in Indicates that in a given Under the condition of Caused by Uncertainty is reduced; is given and The conditional entropy under the joint conditions of ; also use two measurement methods to express JMI, which quantifies the Under the conditions The reduction in uncertainty is as follows:
2. The arrhythmia classification method based on ensemble learning feature selection according to claim 1, characterized in that: The electrocardiogram data is obtained and an electrocardiogram data set is formed, and the electrocardiogram data set is divided into four mutually exclusive subsets of equal proportions of sample categories according to the StratifiedKFold stratified K-fold cross-validation method, specifically including: The sample categories in the four mutually exclusive subsets have the same ratio as that in the electrocardiogram dataset.
3. The arrhythmia classification method based on ensemble learning feature selection according to claim 1, characterized in that: The four mutually exclusive subsets are processed by MI, CMI, JMI and mRMR feature selection methods to form a sample set. , also includes: The maximum relevant information criterion and the minimum redundancy condition are used for feature selection. The maximum relevant information criterion is as follows: in, yes The number of features in the space, It is an individual characteristic and The mutual information between The minimum redundancy conditions are as follows: in, It is a feature and Features The mutual information between them.
4. The arrhythmia classification method based on ensemble learning feature selection according to claim 1, characterized in that: The weak selector learning algorithm In the sample set Training a weak selector , using the Bagging ensemble learning algorithm for weak selectors The output results of are combined to obtain the final strong selector, and the optimal feature group is output, including: Using weak selector learning algorithm In the sample set Training a weak selector ; Use majority voting rules for weak selectors The output results are combined.
5. The arrhythmia classification method based on ensemble learning feature selection according to claim 1, characterized in that: The random forest classifier is constructed based on the random forest algorithm, the random forest classifier is trained according to the best feature group, and the prediction category is determined by the majority voting principle, specifically including: Several decision tree models The random forest classifier is constructed by integration, where are independent random vectors with the same distribution; Set the marginal function and generalization error, use the majority voting principle to determine the prediction category, and get the final output ; The marginal function is: in, [•] is the indicator function; the generalization error is: in, and Yes means A random vector of spatial probabilities, Represents the marginal function measure; the RF constructed is An ensemble of trees , ,..., ,in is a dimensional input vector, the ensemble generates Output , ,..., , is the decision tree number The outputs of these randomly generated trees are aggregated to obtain a final prediction , which is the average value of all trees in the forest, RF is obtained from Training samples are generated A decision tree.
6. The arrhythmia classification method based on ensemble learning feature selection according to claim 1, wherein the step of training the random forest classifier according to the optimal feature group comprises: Building a training data set based on the optimal feature set, and randomly selecting a sample from the training data set; Generate a decision tree based on the selected random sample, and perform node segmentation based on the best segmentation in a random subset of the input variables, where the random subset is a tuning parameter of the random forest algorithm; Repeat the above steps until C trees are grown.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a program for an arrhythmia classification method based on ensemble learning feature selection. When the program for an arrhythmia classification method based on ensemble learning feature selection is executed by a processor, the steps of the arrhythmia classification method based on ensemble learning feature selection as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Enhanced integrated remote sensing image classification method
CN111414863A
Teacher award prediction method based on feature selection and ensemble learning
CN115409285A