## 5 Result and Discussion
### Confusion Matrix
RQ2: What is the impact of the CNN as a classifier in combination with Softmax for multi-class in predicting the cross-project defect prediction accuracy of the PROMISE repository? In this research question, we are finding the impact of the CNN classifier along with Softmax for the multi-class dataset. The Softmax layer is better suitable for multi-classification because of the range of its output probabilities [11]. The range will be 0 to 1, and the sum of all the probabilities will be equal to one. The PROMISE repository has 63 output classes. We have the majority of the instances of 0 and 1 classes and a limited number of instances for all the other classes greater than 1 and less than 63. The reason for considering all the classes greater than one is that due to the vast distribution between the number of instances of the source and target projects, the CTGAN is unable to generate synthetic data which covers all instances of the ranges to obtain a higher defect prediction accuracy. The CTGAN first trains the classifier based on the number of instances and then generates the synthetic data on the pattern of the existing classes. So, to overcome this issue and to have greater data for training, we considered all those outliers' classes as class 2. In the Table 9 below, we achieved higher defect prediction accuracies, highlighted as bold, for those projects in terms of the AUC measure whose dataset ranges are within the ranges of the source projects, such as the existence of a very minimal distribution gap between the source and target projects. The source project has enough number of instances for each class with a minimal distribution gap, so the CTGAN was trained enough and generated enough synthetic clone data for each of the classes to overcome the class distribution problem. \begin{table}
\begin{tabular}{l l l l} \hline \hline \multirow{2}{*}{**Target**} & \multirow{2}{*}{**Source**} & **AUC** & \\ \cline{3-4}  & & **All Features + CNN** & **XGBoost + CNN** \\ \hline \multirow{8}{*}{**Ant 1.7**} & Ivy & 75.67\% & 82.41\% \\ \cline{2-4}  & Camel & 72.04\% & 81.83\% \\ \cline{1-1} \cline{2-4}  & Synapse & 75.46\% & 85.95\% \\ \cline{1-1} \cline{2-4}  & Velocity & 49.55\% & 61.89\% \\ \cline{1-1} \cline{2-4}  & Lucene & 71.58\% & 73.49\% \\ \cline{1-1} \cline{2-4}  & Poi & 71.05\% & 76.79\% \\ \cline{1-1} \cline{2-4}  & Xerces & 50.91\% & 61.61\% \\ \cline{1-1} \cline{2-4}  & Xalan & 75.43\% & 81.31\% \\ \cline{1-1} \cline{2-4}  & Log4j & 65.65\% & 68.54\% \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Impact on defect prediction accuracy with or without feature selection. In Table 9 above, the dashes represent the different versions of the selected target. So, when we select any of the targets, we do not calculate the accuracies for its own different versions because the procedure is used for a within-project defect prediction or a within-version defect prediction, and we are working on this paper as a cross-project defect prediction. Therefore, dashes represent a result of no accuracy for its versions. We used a combined version of the source instead of considering a single version as the source. To effectively train the classifier, we need too large a number of data, so hence using a combined dataset of different versions consists of different data ranges instead of very few data. We can also be able to generate the required amount of data using the CTGAN for the selected resource, but the CTGAN generates data in the same space as the source with minimal distribution in the dataset. So, in this way, we are unable to receive a better accuracy for the target projects having marginal differences in each feature of the data, as represented in bold italic. By combining all the versions of the source, we have different variations for each feature of the dataset and will be able to obtain a better accuracy for each of the target projects.