# Cross-Project Defect Prediction Based on Domain Adaptation and LSTM Optimization
## 3 Methodology
### Proposed Features Selection Approach
Moreover, feature selection methods reduce data distribution differences in order to increase the efficiency and efficacy of defect prediction models [52]. [PERSON] et al. [53] introduced a cross project defect prediction technique based on feature selection and distance weight instance transfer. They showed the efficiency of feature selection on the suggested method. [PERSON] et al. [50] suggested a multi-source-based cross project defect prediction technique MSCPDP, which can handle the problem of data distribution differences between source and target domains. ## 5 Experimental Results

In this section, we present the experimental results and provide the answers to the research questions from Section 4.4. ### Research Question--RQ1

In order to address RQ1, Table 4 reports the proposed model's performance on the AEEEM dataset with and without data balancing, and Table 5 reports the prediction model's performance on the PROMISE dataset. Our model averages for the unbalanced datasets (F1-measure and _AUC_) are 0.503 and 0.466 for AEEEM and 0.380 and 0.510 for PROMISE. The average value of our proposed model on the balanced datasets (F1-measure and _AUC_) are 0.891 and 0.801 for AEEEM and 0.643 and 0.680 for PROMISE. From Tables 3 and 4, it can be observed that the overall performance of the prediction model trained from the data processed by data balancing is significantly improved, with an average F1-measure improvement of about 77.34% and _AUC_ improvement of about 71.98% on AEEEM and F1-measure improvement of about 69.21% and _AUC_ improvement of about 33.33% on PROMISE, as compared to without data balancing. The Box plots of performance measures for the AEEEM datasets are shown in Figures 5 and 6, displaying the performance measures for the PROMISE datasets with and without data balancing (F1-measure and _AUC_). Compared to the data without data balancing, we can observe that the prediction models trained using the data processed by data balancing have larger numerical intervals in the overall distribution. As a result, we can conclude that the data balancing strategy put forth in this study works well in enhancing the CPDP model's performance across all datasets. \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 EQ & JDT & 0.580 & 0.900 & 0.447 & 0.875 \\ EQ & LC & 0.588 & 0.917 & 0.416 & 0.750 \\ EQ & ML & 0.563 & 0.895 & 0.413 & 0.731 \\ EQ & PDE & 0.457 & 0.879 & 0.412 & 0.771 \\ JDT & EQ & 0.578 & 0.892 & 0.602 & 0.900 \\ JDT & LC & 0.494 & 0.879 & 0.510 & 0.810 \\ JDT & ML & 0.489 & 0.887 & 0.427 & 0.762 \\ JDT & PDE & 0.483 & 0.875 & 0.420 & 0.761 \\ LC & EQ & 0.488 & 0.878 & 0.510 & 0.846 \\ LC & JDT & 0.491 & 0.923 & 0.515 & 0.848 \\ LC & ML & 0.481 & 0.869 & 0.422 & 0.738 \\ LC & PDE & 0.478 & 0.871 & 0.429 & 0.760 \\ ML & EQ & 0.480 & 0.893 & 0.513 & 0.848 \\ ML & JDT & 0.466 & 0.899 & 0.509 & 0.823 \\ ML & LC & 0.499 & 0.938 & 0.507 & 0.835 \\ ML & PDE & 0.487 & 0.873 & 0.418 & 0.750 \\ PDE & EQ & 0.489 & 0.908 & 0.514 & 0.883 \\ PDE & JDT & 0.497 & 0.891 & 0.412 & 0.791 \\ PDE & LC & 0.480 & 0.884 & 0.519 & 0.820 \\ PDE & ML & 0.495 & 0.877 & 0.415 & 0.725 \\ Average & & 0.503 & 0.891 & 0.466 & 0.801 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: F1-measure and _AUC_ of proposed model with and without data balancing method on AEEEM.