Reuse estimate and interval prediction using MOGA-NN and RBF-NN in the functional paradigm
Abstract
Context: Reusability estimation of a software component is beneficial in constructing a library of reusable components. The inherent characteristics of the functional paradigm in principle support reuse better than other paradigms. In this paper, we consider the reusability of functions written in the Haskell programming language, which is a functional programming language. Objective: We aim to develop a framework for measuring the reusability of Haskell functions. Given a function, we build a model that can provide a reuse estimate of that function using source code metrics derived solely from that function. This developed model provides a prediction interval for the reuse estimate, which is more useful than a point estimate because of the confidence associated with the prediction. This paper also compares two algorithms used for interval prediction viz. MOGA-NN and RBF-NN. Method: We have used the Indegree of a function and probabilities derived from the clustering of functions to construct our reuse estimate. We have used a multiobjective genetic algorithm trained neural network (MOGA-NN) and radial basis function neural nets (RBF-NN) combined with the k-nearest neighbor algorithm for making interval predictions. Results: The developed model successfully predicts the reuse estimate of three open-source Haskell packages. Both MOGA-NN and RBF-NN have quite similar performance in terms of Root mean square error values for training and testing data, but RBF-NN dominates in the prediction of the bounds of the reuse estimate. Conclusion: We have shown how source code metrics computed from a Haskell function can be used to predict the reuse estimate of a given function. We also conclude that radial basis function neural networks are more accurate in providing a prediction interval for reuse estimate. © 2021 Elsevier B.V.