[Paper Review] The Impact of Feature Selection on Predicting the Number of Bugs
This study investigates the impact of feature selection on predicting the number of bugs in Java software systems using regression models. It compares correlation-based filter (CFS) and wrapper feature selection methods across five machine learning models, finding that wrappers significantly improve prediction accuracy (up to 33%) while reducing feature count by over half, outperforming CFS consistently and selecting a mix of source code and change metrics across projects.
Bug prediction is the process of training a machine learning model on software metrics and fault information to predict bugs in software entities. While feature selection is an important step in building a robust prediction model, there is insufficient evidence about its impact on predicting the number of bugs in software systems. We study the impact of both correlation-based feature selection (CFS) filter methods and wrapper feature selection methods on five widely-used prediction models and demonstrate how these models perform with or without feature selection to predict the number of bugs in five different open source Java software systems. Our results show that wrappers outperform the CFS filter; they improve prediction accuracy by up to 33% while eliminating more than half of the features. We also observe that though the same feature selection method chooses different feature subsets in different projects, this subset always contains a mix of source code and change metrics.
Motivation & Objective
- To address the lack of research on feature selection's impact in predicting the number of bugs, a regression problem in software defect prediction.
- To compare the effectiveness of filter (CFS) and wrapper feature selection methods in improving prediction accuracy across diverse machine learning models.
- To investigate whether feature subsets are consistent across different software projects or vary per project and method.
- To determine if combining source code and change metrics yields better predictive performance.
- To highlight the necessity of project-specific feature selection and advocate for more publicly available datasets with actual bug counts.
Proposed method
- Empirically evaluate five machine learning models—K-Nearest Neighbour, Linear Regression, Multilayer Perceptron, Random Forest, and Support Vector Machine—on five open-source Java projects: Eclipse JDT Core, Eclipse PDE UI, Equinox, Lucene, and Mylyn.
- Apply correlation-based feature selection (CFS) as a filter method and wrapper feature selection (using model-specific accuracy as fitness function) as a wrapper method.
- Use 10-fold cross-validation to assess prediction accuracy (RMSE) with and without feature selection across all models and projects.
- Measure feature reduction, model complexity, and consistency of selected features across projects and methods.
- Analyze the composition of selected feature subsets to determine the prevalence of source code vs. change metrics.
- Use statistical significance testing to validate performance differences between feature selection methods.
Experimental results
Research questions
- RQ1RQ1: How does feature selection impact the prediction accuracy of machine learning models in predicting the number of bugs?
- RQ2RQ2: Are wrapper feature selection methods better than filter methods in improving prediction accuracy?
- RQ3RQ3: Do different feature selection methods choose different feature subsets across projects?
- RQ4RQ4: Is there a consistent set of features that works across multiple projects, or is feature selection project-specific?
Key findings
- Wrapper feature selection improved prediction accuracy by up to 33% in 76% of experiments and never degraded performance, while CFS improved accuracy in only 32% of experiments and degraded it in 24%.
- The wrapper method reduced the number of features by up to 87%, significantly simplifying models while maintaining or improving performance.
- Random Forest models showed negligible sensitivity to feature selection, suggesting they are robust to redundant or correlated features.
- Despite method and project differences, all selected feature subsets contained a mix of source code and change metrics, indicating their combined importance in prediction.
- There was no consistent feature subset across projects, confirming that feature selection must be performed separately for each new project.
- The study confirms that feature selection is essential in bug prediction as a regression problem and that wrappers are superior to filters in this context.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.