An automatic cell type classification method based on ensemble learning

Through the integrated learning method combined with multiple machine learning algorithms, bagging and voting methods, the problems of gene expression matrix differences and classification performance instability caused by single-cell RNA sequencing technology are solved, and better classification on multiple data sets are achieved Performance and generalization.

CN114882954BActive Publication Date: 2024-11-12BEIJING ZHONGGUANCUN LIFE & HEALTH IND SERVICES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210570833.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2024-11-12
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

The differences in gene expression matrix caused by single-cell RNA sequencing technology and the impact of different sequencing data sets on machine learning classifiers lead to unstable classification performance, and a single machine learning algorithm is difficult to meet the high performance requirements of different data sets.

Method used

Using an automated cell type classification method based on integrated learning, the final cell type is determined by combining multiple machine learning algorithms using bagging and voting methods, including preprocessing, feature pool construction, machine learning algorithm selection, feature extraction and multiple repetitive learning , , uses K-nearest neighbors, naive Bayes, logistic regression, support vector machine and random forest algorithm for ensemble learning.

Benefits of technology

It improves the performance and generalization of cell classification, can achieve better classification results on multiple different types of single-cell RNA sequencing data sets, and enhances the reliability and stability of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114882954B_ABST
    Figure CN114882954B_ABST
Patent Text Reader

Abstract

An automatic cell type classification method based on ensemble learning. This ensemble learning algorithm uses bagging to integrate various machine learning algorithms with good performance in the field of single-cell sequencing, such as support vector machine (SVM), logistic regression (LR), random forest (RF), etc., and uses voting to determine the final predicted cell type. Using this ensemble learning method to compare the performance of cell classification on multiple different types of single-cell RNA sequencing data sets will achieve better classification performance, reflecting the generalization and superiority of this ensemble learning method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the cross-field of computer information technology and medicine and engineering, and specifically relates to an automatic classification method of cell types based on ensemble learning. Background Art

[0002] At the current stage, there are still great differences in the technologies of different sequencing companies for single-cell RNA sequencing technology. The gene expression matrix generated by sequencing is affected by the sequencing technology, the type of cells to be tested, and the quality of the cells to be tested, resulting in huge changes in the sequencing results even when sequencing the same organs and tissues of the same organism. The changes in sequencing results lead to great differences in the performance of the gene expression matrix generated by sequencing in cell classification, and different sequencing data have different classification effects for different machine learning classifiers. In order to cope with different sequencing data sets, the algorithm needs to have strong generalization. If only a single machine learning algorithm is used, it is difficult to meet the high performance requirements of classification results for different sequencing data sets. Summary of the invention

[0003] In view of the problems existing in the above-mentioned background technology, the present invention proposes a method for automatic classification of cell types based on ensemble learning. Through the ensemble learning method, a variety of base learners that perform well in the field of single-cell RNA sequencing are combined, and the advantages of various base learners are integrated to finally determine the final cell type through bagging and voting.

[0004] A method for automatic cell type classification based on ensemble learning includes the following steps:

[0005] Step 1, obtain single cell sample data for preprocessing to obtain a gene expression matrix;

[0006] Step 2, construction of feature pool: taking genes in the gene expression matrix as features, constructing a feature pool;

[0007] Step 3, machine learning algorithm selection: train the machine learning algorithm for all the features in the feature pool, compare their classification performance, and select the classification algorithm with better performance as the base classifier of the subsequent integrated algorithm;

[0008] Step 4, feature extraction operation: extract k features from the feature pool with replacement, and use these features for subsequent base classifier learning;

[0009] Step 5, base classifier learning: using the features obtained by the feature extraction operation, the base classifier is trained to learn the features;

[0010] The features in step 3 are fixed, which are all the features. No feature extraction operation is used. A part of the features are selected each time, with the purpose of selecting the best base learner. The features in step 5 are randomly extracted each time, with the purpose of using the base learning machine for integration;

[0011] Step 6, repeat the learning multiple times; for each base classifier pre-selected by the machine learning algorithm, repeat the operations of steps 4-5 t times; for n base classifiers, repeat the learning a total of nt times;

[0012] Step 7, voting to determine the classification type; the trained classifiers are integrated by voting, that is, nt base classifiers determine the final cell type of the cell by voting.

[0013] Furthermore, in step 1, preprocessing includes quality control of raw sample data, comparison with reference genome, quantitative analysis, and construction of single-cell gene expression matrix.

[0014] Furthermore, in step 2, the specific process of constructing the feature pool is to use the column labels of the original gene expression matrix, namely genes, as features, and to break them up to construct a feature pool.

[0015] Furthermore, in step 3, all features and data are used to perform cell type classification experiments on different machine learning algorithms to compare their classification performances.

[0016] Furthermore, in step 3, the machine learning algorithms include K-nearest neighbor algorithm KNN, naive Bayes NB, logistic regression LR, support vector machine SVM, and random forest RF.

[0017] Furthermore, in step 7, this method adopts a bagging integration method.

[0018] Furthermore, in step 7, the voting method is that for n base classifiers, each base classifier randomly extracts features and repeats the training t times. Each base classifier will obtain a cell type in each training, that is, one vote is cast for the cell type, a total of nt votes, and the cell type with the highest number of votes is the predicted final cell type.

[0019] The beneficial effects achieved by the present invention are as follows: experimental verification is carried out, and the performance comparison of cell classification using the ensemble learning method on multiple different types of single-cell RNA sequencing data sets can achieve better classification performance, reflecting the generalization and superiority of the ensemble learning method. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 Schematic diagram of the process of automatic cell type classification method based on ensemble learning in an embodiment of the present invention.

[0021] Figure 2 Schematic diagram of the classification performance of various classifiers for PBMC datasets in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings.

[0023] The purpose of using ensemble learning for cell type classification is to make up for the shortcomings of insufficient generalization of a single machine learning algorithm. Multiple data sets will be used to select the optimal integration strategy based on different sequencing companies and sequencing technologies. Therefore, public single-cell RNA sequencing data sets provided by various companies can be collected, such as the human peripheral blood mononuclear cell sequencing data set (PBMC) of 10XGenomics and the public data set collected by the National Biotechnology Information of the United States, the human chronic myeloid leukemia single-cell sequencing data set (GSE76312), and the triple-negative breast cancer single-cell sequencing data set (TNBC).

[0024] Ensemble learning can combine multiple base learners with weaker performance, and often obtain an ensemble learner with better performance and stronger generalization than these base learners. Therefore, the present invention can select the following five classification algorithms to perform cell classification experiments on single-cell RNA sequencing data sets, compare the performance differences of different classification algorithms on different single-cell sequencing data sets, and select several better classification algorithms for integration.

[0025] 1) K-nearest neighbor algorithm (KNN). The principle of KNN is that when predicting a new value x, it determines which category x belongs to based on the category of the K points closest to it. The Manhattan distance between two points is calculated to determine which points are the closest K points. The Manhattan distance calculation formula is as follows:

[0026]

[0027] In multidimensional space, it expands to the following:

[0028]

[0029] 2) Naive Bayes (NB). Naive Bayes uses the principle of maximizing the posterior probability in statistics, assuming that the features are independent of each other, and uses the Bayesian formula to calculate the probability of the category of the sample under fixed feature conditions, and takes the category with the maximum probability calculated as the classification result. The Bayesian formula is as follows:

[0030]

[0031] Among them, P(B) represents the probability that the sample belongs to category B, P(A) represents the probability that feature A appears, and P(B|A) represents the probability that the sample category is B when feature A is known. P(A|B) represents the probability that the sample still has feature A when feature A is known.

[0032] 3) Logistic regression (LR). Logistic regression is a generalization of linear regression, which is essentially a logarithmic probability regression. Compared with the continuous value of the dependent variable in linear regression, the dependent variable in logistic regression is a binary value of 0 or 1, and the continuous value is converted into a binary value through the sigmoid function. The sigmoid function formula of logistic regression is as follows:

[0033]

[0034] 4) Support Vector Machine (SVM). The essence of support vector machine is to use a perfect straight line or hyperplane to divide linearly separable data into two categories. The farther the hyperplane that separates the two types of data is from the two types of data, the more reliable the segmentation performance. Therefore, it is necessary to find the point closest to the hyperplane, and at the same time make the absolute value of the distance to the point closest to the hyperplane as large as possible. The hyperplane formula for segmentation is as follows:

[0035] ω T x+b=0 (5)

[0036] Where ω and b are the normal vector and intercept of the hyperplane respectively, and x is the coordinate of the point on the hyperplane.

[0037] The interval formula from the data point to the splitting hyperplane is as follows:

[0038]

[0039] Therefore, after having the interval formula, we need to find the best set of ω and b to maximize the interval from the data point to the hyperplane.

[0040] 5) Random Forest (RF). The essence of the random forest algorithm is also ensemble learning. The random forest algorithm uses a single decision tree as the base classifier, uses the bagging ensemble method, and combines the voting method. Generally speaking, the number of feature selections for the base classifier in the random forest is k = log2 d, where d is the total number of features, that is, k features are extracted from all features with replacement, and the decision tree algorithm is used as a classifier for classification training for these extracted features. These decision trees do not have a maximum depth setting and can grow to any depth without involving pruning.

[0041] The above five classification algorithms are used to classify the various collected data sets, and the three best algorithms are selected as base learners to construct an automatic cell type classification algorithm based on ensemble learning.

[0042] Ensemble learning algorithms are mainly divided into two types: bagging and boosting. The bagging algorithm mainly trains multiple base learners independently in parallel, and then fuses multiple learning results by voting or weighting to obtain more accurate results. Boosting originally means to improve, and it is an integrated method that uses a serial method to improve the learning effect step by step. The most widely used representative algorithm in the bagging algorithm is random forest, and the most representative boosting algorithm is adaboost. The two ensemble learning algorithms have their own advantages and disadvantages. The main advantage of the bagging algorithm is to win in quantity. It trains multiple base learners independently in parallel and then fuses all the base learning methods. Boosting uses a step-by-step improvement method to optimize performance.

[0043] The main purpose of the present invention to train the cell type classification algorithm based on ensemble learning is to prevent a single machine learning algorithm from having performance differences on different sequencing data sets and to improve the generalization of the algorithm. Therefore, the present invention uses the bagging ensemble method, uses the selected base learner, and finally uses voting to select the final cell type. This method can effectively improve the generalization of the algorithm and prevent the drawback of a single algorithm being unstable on different data sets.

[0044] There are two sampling methods in the bagging ensemble algorithm: one is to sample with replacement, and the other is to sample without replacement. Sampling with replacement means that the sampled samples of each base learner may contain repeated samples, which can increase the randomness of the samples and enhance the training effect of ensemble learning.

[0045] This method samples the samples with replacement while also sampling the features of the samples with replacement, which increases the randomness of the sample dimension and the randomness of the feature dimension at the same time, making the prediction results of the trained base learner more diversified and increasing the reliability and generalization of the final integrated algorithm.

[0046] The present invention will use standard machine learning classification performance evaluation indicators to evaluate the classification experimental results, referring to Figure 2 , the evaluation indicators for each machine learning classification algorithm from left to right include: Accuracy (ACC), Precision (P), Recall (R), and comprehensive evaluation value F1 (F1_Score). These indicators are used to evaluate the performance of different classification models. The formulas for these indicators are defined as follows:

[0047]

[0048]

[0049]

[0050]

[0051] In the formula: TP is true positive, which refers to the number of samples correctly predicted as positive, whose true values ​​are also positive; FN is false negative, which refers to the number of samples wrongly predicted as negative, whose true values ​​are positive; FP is false positive, which refers to the number of samples wrongly predicted as positive, whose true values ​​are negative; TN is true negative, which refers to the number of samples correctly predicted as negative, whose true values ​​are negative.

[0052] Figure 1 It shows that the above method is used to select the automatic classification algorithm process of cell types for ensemble learning with SVM, LR and RF as the base learner. Figure 2 The classification performance of various classifiers for the PBMC dataset is shown, including the classification performance obtained by the 5-category classification algorithm and the ensemble learning (ACCTEL) using the above method. It can be seen that this method can achieve good results in accuracy, precision, recall, and comprehensive evaluation value.

[0053] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.

Claims

1. A method for automatic cell type classification based on ensemble learning, characterized in that: The method comprises the following steps: Step 1, obtain single cell sample data for preprocessing to obtain a gene expression matrix; Step 2, construction of feature pool: taking genes in the gene expression matrix as features, constructing a feature pool; Step 3, machine learning algorithm selection: train the machine learning algorithm for all the features in the feature pool, compare their classification performance, and select the classification algorithm with better performance as the base classifier of the subsequent integrated algorithm; Step 4, feature extraction operation: extract k features from the feature pool with replacement, and use these features for subsequent base classifier learning; Step 5, base classifier learning; Using the features obtained by the feature extraction operation, the base classifier is trained by learning the features; Step 6, repeat the learning multiple times; for each base classifier pre-selected by the machine learning algorithm, repeat the operations of steps 4-5 t times; for n base classifiers, repeat the learning a total of nt times; Step 7, voting to determine the classification type; the trained classifiers are integrated by voting, that is, nt base classifiers determine the final cell type of the cell by voting.

2. The method for automatic cell type classification based on ensemble learning according to claim 1, characterized in that: In step 1, preprocessing includes quality control of raw sample data, comparison with the reference genome, quantitative analysis, and construction of a single-cell gene expression matrix.

3. The method for automatic cell type classification based on ensemble learning according to claim 1, characterized in that: In step 2, the specific process of constructing the feature pool is to use the column labels of the original gene expression matrix, namely genes, as features, and break them up to construct a feature pool.

4. The method for automatic cell type classification based on ensemble learning according to claim 1, characterized in that: In step 3, all features and data are used to perform cell type classification experiments on different machine learning algorithms to compare their classification performance.

5. The method for automatic cell type classification based on ensemble learning according to claim 4, characterized in that: In step 3, the machine learning algorithms include K-nearest neighbor algorithm KNN, naive Bayes NB, logistic regression LR, support vector machine SVM, and random forest RF.

6. The method for automatic cell type classification based on ensemble learning according to claim 1, characterized in that: In step 7, this method adopts the bagging integration method.

7. The method for automatic cell type classification based on ensemble learning according to claim 1, characterized in that: In step 7, the voting method is that for n base classifiers, each base classifier randomly extracts features and repeats the training t times. Each time each base classifier is trained, a cell type is obtained, that is, one vote is cast for the cell type, a total of nt votes, and the cell type with the highest number of votes is the final predicted cell type.