# Cross-Project Defect Prediction Based on Domain Adaptation and LSTM Optimization
## 3 Methodology
### Proposed Features Selection Approach
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Source** & **Target** & \multicolumn{2}{c}{**F1-Measure**} & \multicolumn{2}{c}{_AUC_} \\ \hline  & & **Without** & **With** & **Without** & **With** \\  & & **SMOTE-ENN** & **SMOTE-ENN** & **SMOTE-ENN** & **SMOTE-ENN** \\ \hline synapse\_1.2 & poi-2.5 & 0.390 & 0.651 & 0.502 & 0.674 \\ synapse\_1.2 & xerces-1.2 & 0.378 & 0.602 & 0.519 & 0.712 \\ camel-1.4 & ant-1.6 & 0.381 & 0.656 & 0.514 & 0.669 \\ camel-1.4 & jedit\_4.1 & 0.378 & 0.636 & 0.480 & 0.612 \\ xerces-1.3 & poi-2.5 & 0.332 & 0.595 & 0.499 & 0.633 \\ xerces-1.3 & synapse\_1.1 & 0.328 & 0.588 & 0.501 & 0.602 \\ xerces-1.2 & xalan-2.5 & 0.330 & 0.571 & 0.513 & 0.722 \\ lucene\_2.2 & xalan-2.5 & 0.393 & 0.612 & 0.520 & 0.733 \\ synapse\_1.1 & poi-3.0 & 0.387 & 0.602 & 0.497 & 0.630 \\ ant-1.6 & poi-3.0 & 0.319 & 0.520 & 0.460 & 0.619 \\ camel-1.4 & ant-1.6 & 0.430 & 0.782 & 0.537 & 0.713 \\ lucene\_2.2 & ant-1.6 & 0.417 & 0.772 & 0.522 & 0.729 \\ lqq4j-1.1 & ant-1.6 & 0.415 & 0.745 & 0.528 & 0.733 \\ log4j-1.1 & lucene\_2.0 & 0.402 & 0.733 & 0.527 & 0.757 \\ lucene\_2.0 & log4j-1.1 & 0.449 & 0.742 & 0.560 & 0.719 \\ lucene\_2.0 & xalan-2.5 & 0.342 & 0.546 & 0.501 & 0.669 \\ jedit\_4.1 & camel-1.4 & 0.401 & 0.678 & 0.498 & 0.644 \\ jedit\_4.1 & xalan-2.4 & 0.376 & 0.552 & 0.517 & 0.680 \\ Average & & 0.380 & 0.643 & 0.510 & 0.680 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: F1-measure and _AUC_ of proposed model with and without data balancing method on PROMISE. ### Research Question

_RQ2_

In order to address RQ2, Tables 6 and 7 present the prediction model's performance on the AEEEM and PROMISE dataset with and without feature selection. The average value of our model on the datasets without feature selection (F1-measure and _AUC_) are 0.678 and 0.637 on AEEEM and 0.443 and 0.496 on PROMISE. The average value of our model on the feature selected datasets (F1-measure and _AUC_) are 0.891 and 0.801 on AEEEM and 0.643 and 0.680 on PROMISE. From Tables 5 and 6, it can be observed that the overall performance of the prediction model trained from the data processed by the feature selection is significantly improved, with an average F1-measure improvement of

Figure 5: Boxplot of F1-measure and _AUC_ of model with and without Smote-Enn on AEEEM. Figure 6: Boxplot of F1-measure and _AUC_ of model with and without Smote-Enn on PROMISE. about 31.41% and _AUC_ improvement of about 25.74% on AEEEM, and an F1-measure improvement of about 31.39% and _AUC_ improvement of about 28.88% on PROMISE, as compared to without feature selection. The Box plots of performance measures for the AEEEM datasets are shown in Figure 7 and the Box plots of performance measures for the PROMISE datasets are shown in Figure 8, with and without feature selection (F1-measure and _AUC_). We observe that our proposed model shows good results on the feature-selected datasets, indicating that the proposed model performs well and that the feature selection method plays a significant role in enhancing prediction performance.