Selecting Software Engineering Metrics: The Case of C#
摘要
In the last years the process of obtaining the software metrics has become easier: different kind of metrics e.g. language-specific, were proposed, new tools to collect metrics emerged. Although the process of developing and maintaining software has indeed improved, the new problem has arisen – the abundance of metrics. Ignoring such a problem can lead to collinearity, overfitting when using metrics, and inefficiency when storing them. However, how to choose the right metrics and which algorithms to use? This paper presents a comparative analysis of three metaheuristic algorithms – Binary Ant Colony Optimization, Reptile Search Algorithm, and Grey Wolf Optimizer, for selecting optimal metrics subsets in software repositories. We used 118 C# repositories with 54 metrics (40 class-level and 14 method-level) computed on them to select optimal subsets of metrics for class and method levels. It was accomplished by minimizing dimensionality while preserving the geometric structure of the repositories. Using Sammon error and Kruskal's stress function as the optimization criteria, we demonstrate that a small subset of metrics can effectively represent repository characteristics.