# Class-Level Refactoring Prediction by Ensemble Learning with Various Feature Selection Techniques
## 3 Research Methodology
### Extreme Learning Machine (ELM)  
Differing from major conventional neuro-computing models, as discussed above, they undergo certain local minim and convergence and find themselves limited to function over large-scale data. These problems become more severe with large datasets, which demand more input layers and a corresponding ANN structure. Consequently, with classical ANN models for large data sizes, the neurons at the hidden layer also increase, further augmenting the number of weight parameters required for learning. As a result, this makes classical neuro-computing methods vulnerable to high latency and convergence issues. To alleviate such problems, ELM can be a potential alternative. ELM is defined as a single-layered multi-feed-forward neural network (SL-MFNN) that allows more efficient generalization than classical approaches. Using random node selection and corresponding weight estimation makes it more time-efficient. Our proposed refactoring classification method has applied ELM as a base classifier to constitute a heterogeneous ensemble structure. Inputting the 125 code metrics from software, it exhibits multivariate regression, enabling the labeling each class as refactoring prone or non-refactoring. A snippet of the typical ELM model is given in Figure 3.  
Observing Figure 3, it can be found that ELM inputs comprise \(X\) and \(Y\), where \(X=\left(j_{1},j_{2},\ldots,j_{m},y\right)\) and \(y\) be the targeted value Noticeably, data signifies a vector having \(m+1\) values, while the outputs from the \(i\)th hidden layer are given as \(G(a_{i},b_{i},X)\). In \(G(a_{i},b_{i},X)\)\(b_{i}\) presents the bias value of the \(i\)th neuron, while \(a_{i}=\left(a_{i1},a_{i2},\ldots,a_{im},a_{iy}\right)\) refers to the weight vector. Similarly, \(a_{is}(s=1,2,\ldots\ldots,m,y)\) presents the weights between the \(s\)th input layer and the \(i\)th hidden layer. Thus, the output is in Equation (16) with the above-defined ELM model. \[y(t+k)=f(X)=\sum_{i=1}^{L}\ \beta_{i}G(a_{i},b_{i},X) \tag{16}\]  
In Equation (16), \(\beta_{i}=\left(\beta_{11},\ldots,\beta_{im},\beta_{iy}\right)^{{}^{\prime}}\) presents the weight vector joining the hidden and output layers. Moreover, the connecting weights in between the \(i\)th hidden layer and \(k\)th output layer is given by \(\beta_{ik}\). The \(G(a_{i},b_{i},X)\) can be defined for other hidden neurons as shown in Equation (17). \[G(a_{i},b_{i},X)=g\big{(}a_{i}^{\prime}X+b_{i}\big{)} \tag{17}\]  
Figure 3: A typical ELM structure for refactoring Prediction. In Equation (17), \(g:\ R\to R\) presents the activation function. The ELM model in our proposed classification problem considers random weight component \(a_{i}\) and biasing component \(b_{i}\). Typically, ELM with \(L\) hidden neurons can be hypothesized to exhibit learning over N samples with zero error probability with the connecting weight \(\beta_{i}\). Mathematically, the output can be defined as Equation (18). \[Y_{j}=\sum_{i=1}^{L}\ \beta_{i}G\big{(}a_{i},b_{i},X_{j}\big{)},\ j=1,2,\ldots \ldots,N \tag{18}\]  
\[Y=\beta H \tag{19}\]  
where  
\[Y=\left[y_{1}^{Y}\vdots y_{N}^{Y}\right]_{N\times M},\ \beta=\left[\beta_{1}^{Y} \vdots\beta_{L}^{Y}\right]_{L\times M}\]  
\[H=\left[ \begin{array}{ccc}G(a_{1},b_{1},X_{1})&\ldots&G(a_{L},b_{L},X_{1}) \\ &\vdots&\ldots&\vdots\\ G(a_{1},b_{1},X_{N})&\ldots&G(a_{L},b_{L},X_{N})\end{array} \right]_{N\times L} \tag{20}\]  
Redefining Equation (19), we obtain output as Equation (20). In the proposed ELM model, a minimum norm least-squares solution \(\beta^{*}\) is applied to minimize \(\beta^{*}\) in addition to the weight parameters and bias values. Mathematically, \(\beta^{*}\) is referred to as Equation (21). \[\beta^{*}=H^{+}Y \tag{21}\]  
In Equation (21), \(H^{+}\) signifies the Moore-Penrose generalized inverse of the matrix \(H\). The ELM proposed here has achieved the following significant functions to enable binary classification. In our proposed ELM-based classifier, the output \(y^{*}\) for each class is obtained as per Equation (22).