{"title":"利用特征选择和数据平衡的集合方法提高代码气味分类性能","authors":"Pravin Singh Yadav , Rajwant Singh Rao , Alok Mishra , Manjari Gupta","doi":"10.1016/j.engappai.2024.109527","DOIUrl":null,"url":null,"abstract":"<div><div>Code smells are software flaws that make it challenging to comprehend, develop, and maintain the software. Identifying and removing code smells is crucial for software quality. This study examines the effectiveness of several machine-learning models before and after applying feature selection and data balancing on code smell datasets. Extreme Gradient Boosting, Gradient Boosting, Adaptive Boosting, Random Forest, Artificial Neural Network (ANN), and Ensemble model of Bagging, and the two best-performing Boosting techniques are used to predict code smell. This study proposes an enhanced approach, which is an ensemble model of the Bagging and Boosting classifier (EMBBC) that incorporates feature selection and data balancing techniques to predict code smells. Four publicly available code smell datasets, Blob Class, Data Class, Long Parameter List, and Switch Statement, were considered for the experimental work. Classes of datasets are balanced using the Synthetic Minority Over-Sampling Technique (SMOTE). A feature selection method called Recursive Feature Elimination with Cross-Validation (RFECV) is used. This study shows that the ensemble model of Bagging and the two best-performing Boosting techniques performs better in Blob Class, Data Class, and Long Parameter List datasets with the highest accuracy of 99.21%, 99.21%, and 97.62%, respectively. In the Switch Statement dataset, the ANN model provides a higher accuracy of 92.86%. Since the proposed model uses only seven features and still provides better results than others, it could be helpful to detect code smells for software engineers and practitioners in less computational time, improving the system's overall performance.</div></div>","PeriodicalId":50523,"journal":{"name":"Engineering Applications of Artificial Intelligence","volume":null,"pages":null},"PeriodicalIF":7.5000,"publicationDate":"2024-10-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Ensemble methods with feature selection and data balancing for improved code smells classification performance\",\"authors\":\"Pravin Singh Yadav , Rajwant Singh Rao , Alok Mishra , Manjari Gupta\",\"doi\":\"10.1016/j.engappai.2024.109527\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Code smells are software flaws that make it challenging to comprehend, develop, and maintain the software. Identifying and removing code smells is crucial for software quality. This study examines the effectiveness of several machine-learning models before and after applying feature selection and data balancing on code smell datasets. Extreme Gradient Boosting, Gradient Boosting, Adaptive Boosting, Random Forest, Artificial Neural Network (ANN), and Ensemble model of Bagging, and the two best-performing Boosting techniques are used to predict code smell. This study proposes an enhanced approach, which is an ensemble model of the Bagging and Boosting classifier (EMBBC) that incorporates feature selection and data balancing techniques to predict code smells. Four publicly available code smell datasets, Blob Class, Data Class, Long Parameter List, and Switch Statement, were considered for the experimental work. Classes of datasets are balanced using the Synthetic Minority Over-Sampling Technique (SMOTE). A feature selection method called Recursive Feature Elimination with Cross-Validation (RFECV) is used. This study shows that the ensemble model of Bagging and the two best-performing Boosting techniques performs better in Blob Class, Data Class, and Long Parameter List datasets with the highest accuracy of 99.21%, 99.21%, and 97.62%, respectively. In the Switch Statement dataset, the ANN model provides a higher accuracy of 92.86%. Since the proposed model uses only seven features and still provides better results than others, it could be helpful to detect code smells for software engineers and practitioners in less computational time, improving the system's overall performance.</div></div>\",\"PeriodicalId\":50523,\"journal\":{\"name\":\"Engineering Applications of Artificial Intelligence\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":7.5000,\"publicationDate\":\"2024-10-28\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Engineering Applications of Artificial Intelligence\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0952197624016853\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"AUTOMATION & CONTROL SYSTEMS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Engineering Applications of Artificial Intelligence","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0952197624016853","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AUTOMATION & CONTROL SYSTEMS","Score":null,"Total":0}
Ensemble methods with feature selection and data balancing for improved code smells classification performance
Code smells are software flaws that make it challenging to comprehend, develop, and maintain the software. Identifying and removing code smells is crucial for software quality. This study examines the effectiveness of several machine-learning models before and after applying feature selection and data balancing on code smell datasets. Extreme Gradient Boosting, Gradient Boosting, Adaptive Boosting, Random Forest, Artificial Neural Network (ANN), and Ensemble model of Bagging, and the two best-performing Boosting techniques are used to predict code smell. This study proposes an enhanced approach, which is an ensemble model of the Bagging and Boosting classifier (EMBBC) that incorporates feature selection and data balancing techniques to predict code smells. Four publicly available code smell datasets, Blob Class, Data Class, Long Parameter List, and Switch Statement, were considered for the experimental work. Classes of datasets are balanced using the Synthetic Minority Over-Sampling Technique (SMOTE). A feature selection method called Recursive Feature Elimination with Cross-Validation (RFECV) is used. This study shows that the ensemble model of Bagging and the two best-performing Boosting techniques performs better in Blob Class, Data Class, and Long Parameter List datasets with the highest accuracy of 99.21%, 99.21%, and 97.62%, respectively. In the Switch Statement dataset, the ANN model provides a higher accuracy of 92.86%. Since the proposed model uses only seven features and still provides better results than others, it could be helpful to detect code smells for software engineers and practitioners in less computational time, improving the system's overall performance.
期刊介绍:
Artificial Intelligence (AI) is pivotal in driving the fourth industrial revolution, witnessing remarkable advancements across various machine learning methodologies. AI techniques have become indispensable tools for practicing engineers, enabling them to tackle previously insurmountable challenges. Engineering Applications of Artificial Intelligence serves as a global platform for the swift dissemination of research elucidating the practical application of AI methods across all engineering disciplines. Submitted papers are expected to present novel aspects of AI utilized in real-world engineering applications, validated using publicly available datasets to ensure the replicability of research outcomes. Join us in exploring the transformative potential of AI in engineering.