Extraction of Prediction Rules of Code Smell using Decision Tree Algorithm
Pravin Singh Yadav, Seema Dewangan, Rajwant Singh Rao · 2021
Code Smell is a set of information of a source code that indicates any serious problem in the software. To detect the code smell prediction rule, we have applied a Decision tree algorithm. For this objective, we have taken two code smell datasets namely Blob-class and Data-class from Fontana et al. These datasets were prepared from 74 open-source systems. To calculate the performance measurement of the decision tree model on each dataset, we applied 5-fold cross-validation that divides datasets into training set and testing set and further splitting the training set into two part, one part is used for training and second part is used for validation. We have applied grid search for hyper-parameter tuning followed by extraction of decision rules to detect code smell instances. We have achieved the highest accuracy of 97.62% in both class predictions.