# Code Smell Detection Using Ensemble Machine Learning Algorithms
## 5 Discussion  
### Result Comparison of Our Approach with Others' Correlated Work  
A few other authors [22, 30, 31, 33, 42] also worked on the same code smell datasets. These authors used machine learning and stack ensemble learning algorithms. In this subsection, we compared the outcomes of our approach with previous related works. They are shown in Table 15. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**MLT**} & **Number of Selected Features** & **Accuracy for DC** & **Accuracy for GC** & **Accuracy for FE** & **Accuracy for LM** \\  & **Selected Features** & **Dataset (\%)** & **Dataset (\%)** & **Dataset (\%)** & **Dataset (\%)** \\ \hline \multirow{6}{*}{XGBoost algorithm} & 8 & 98.80 & 96.42 & 97.87 & 100 \\  & 9 & 98.80 & 97.62 & 97.87 & 100 \\  & 10 & 99.80 & 97.62 & 100 & 100 \\  & 11 & 99.88 & 98.80 & 99.56 & 97.92 \\  & 12 & 99.26 & 97.62 & 97.87 & 97.92 \\  & All features & 98.80 & 97.62 & 97.87 & 97.92 \\ \hline \multirow{6}{*}{ANN} & 8 & 97.23 & 97.12 & 97.98 & 97.96 \\  & 9 & 97.23 & 97.14 & 97.98 & 97.96 \\  & 10 & 97.82 & 97.23 & 97.98 & 98.25 \\  & 11 & 98.67 & 97.98 & 98.76 & 98.25 \\  & 12 & 98.62 & 97.23 & 98.98 & 99.02 \\  & All features & 99.12 & 97.56 & 98.76 & 98.25 \\ \hline \multirow{6}{*}{CNN} & 8 & 97.82 & 97.12 & 98.76 & 98.88 \\  & 9 & 97.82 & 97.23 & 98.98 & 98.88 \\  & 10 & 97.82 & 97.23 & 99.08 & 99.26 \\ \cline{1-1}  & 11 & 98.98 & 98.24 & 99.08 & 99.26 \\ \cline{1-1}  & 12 & 99.26 & 98.24 & 99.56 & 99.36 \\ \cline{1-1}  & All features & 99.16 & 98.78 & 99.36 & 99.26 \\ \hline \hline \end{tabular}
\end{table} 
Table 13: Cont. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Algorithms**} & \multicolumn{2}{c}{**DC**} & \multicolumn{2}{c}{**GC**} & \multicolumn{2}{c}{**FE**} & \multicolumn{2}{c}{**LM**} \\ \cline{2-9}  & **Accuracy with** & **Accuracy without** & **Accuracy with** & **Accuracy with** & **Accuracy without** & **Accuracy with** & **Accuracy without** \\  & **Applied** & **Applied** & **Applied** & **Applied** & **Applied** & **Applied** & **Applied** & **Applied** \\  & **SMOTE** & **SMOTE** & **SMOTE** & **SMOTE** & **SMOTE** & **SMOTE** & **SMOTE** & **SMOTE** \\ \hline AdaBoost & 99.10 & 98.80 & 98.21 & 97.62 & 98.65 & 100 & 100 & 100 \\ Bagging & 99.11 & 99.92 & 98.21 & 99.24 & 100 & 100 & 100 & 100 \\ Max voting & 99.10 & 100 & 98.21 & 97.62 & 100 & 100 & 100 & 100 \\ Gradient & 100 & 99.96 & 99.10 & 98.80 & 100 & 100 & 100 & 100 \\ Boosting & 100 & 99.88 & 97.32 & 98.80 & 98.64 & 100 & 100 & 100 \\ XGBoost & 99.12 & 98.67 & 98.37 & 97.98 & 99.06 & 98.98 & 99.00 & 99.02 \\ CNN & 99.26 & 99.26 & 98.78 & 98.78 & 99.24 & 99.56 & 99.67 & 99.36 \\ \hline \hline \end{tabular}
\end{table} 
Table 14: Outcomes of Ensemble algorithms with and without applied SMOTE. [PERSON] et al. [23] achieved 99.74% accuracy with the RF technique employing all features on the DC dataset. [PERSON] et al. 's [7] approach applied human-understandable detection rules for J48 and JRip algorithms and found 99.02% highest accuracy for the B-J48 Pruned approach. [PERSON] et al. [25] used the GA-based FSA and found the highest accuracy, 99.70%, using the RF approach. [PERSON] et al. [36] applied the gain ratio FSA and found around 83% accuracy with the RF and J48 approach. [PERSON] et al. [22] used the gain FSA and found the highest accuracy, 98.92%, using the Stack-LR algorithm, whereas this approach's accuracy was 100% using the Max voting algorithm with nine features. [PERSON] et al. [23] achieved 98.21% accuracy utilizing the RF method with Chi-square FSA on the GC dataset. [PERSON] et al. [7] applied human-understandable detection rules for the J48 and JRip algorithms and found 97.55% highest accuracy in the Naive Bayes algorithm. [PERSON] et al. [25] used the GA-based FSA and found the highest accuracy, 98.48%, using the GBT model. [PERSON] et al. [36] applied the gain ratio FSA and found around 83% accuracy with the RF and J48 approach. [PERSON] et al.