Dimensionally Reduction based Machine Learning Approaches for Code smells Detection
Seema Dewangan, Rajwant Singh Rao, Pravin Singh Yadav · 2022 International Conference on Intelligent Controller and Computing for Smart Power (ICICCSP) · 2022
Code smells refer to the lack of the software quality, such as difficulty in understandability and changeability. In this research work, we proposed a technique to detect the CSs using three machine learning algorithms. For this purpose, we used two class level and two method level datasets. In this research work, a principle component analysis (PCA) based dimensionality reduction technique is applied to select different components from each datasets. Four PCA based machine learning algorithms are applied, namely Principal component analysis based Logistic regression (PCA_LR), Principal component analysis based Random forest (PCA_RF), Principal component analysis based K-nearest neighbor (PCA_KNN), and Principal component analysis based Decision tree (PCA_DT). The 10-fold cross-validation is used to validate the model accuracy. In this research work, we found that the PCA_LR model gives the best accuracy, 99.97%, for the data class dataset, while the worst accuracy, 77.38%, was found by the PCA_KNN model for the long parameter list dataset.