## 4 Experimental Results of the Proposed Systems
### Results of ANN Classifier Based on Fusion of Features
#### 4.5.4 Confusion Matrix  
The confusion matrix is the most important tool for summarizing the results of deep and machine learning systems. This section presents a confusion matrix of an ANN based on hybrid features for the early diagnosis tuberculosis based on the two tuberculosis datasets. The confusion matrix contains all of the appropriately and inappropriately diagnosed X-rays. A well-diagnosed X-ray falls on the primary diagonal of the confusion matrix, while a misdiagnosed X-ray falls on the rest of the confusion matrix. Class 1 represents normal X-rays, and class 2 represents tuberculosis X-rays. Figure 12 displays the confusion matrix generated by the ANN to classify the first dataset's tuberculosis X-rays. The ANN network, when fed with the hybrid features extracted by ResNet-50, GLCM, DWT and LBP, achieved an overall accuracy of 99.2%, while the ANN network fed with the hybrid features extracted by GoogLeNet, GLCM, DWT and LBP reached an overall accuracy of 98.5%.  
Figure 13 displays the ANN confusion matrix for classifying the second dataset's tuberculosis X-rays. The ANN classifier, when fed with the hybrid features extracted by ResNet-50, GLCM, DWT and LBP, obtained an overall accuracy of 99.8%, while the ANN classifier fed with the hybrid features extracted by GoogLeNet, GLCM, DWT and LBP obtained an overall accuracy of 99.3%.  
The technique of incorporating features extracted by CNN models and GLCM, DWT and LBP algorithms contributed to the accurate diagnosis of tuberculosis based on X-ray images. Table 4 summarizes the results achieved by the ANN algorithm when fed with hybrid features, which achieved promising results in the early detection of tuberculosis. The ANN classifier acheived the following results: first, for the first dataset, when the ANN was fed with the hybrid features extracted by ResNet-50, GLCM, DWT and LBP, it reached an accuracy of 99.2%, a sensitivity of 99.2%, a precision of 99.5%, a specificity of 99.41%, and an AUC of 99.78%. In contrast, when the ANN was fed with the hybrid features extracted by ResNet-50, GLCM, DWT and LBP, it obtained an accuracy of 98.5%, a sensitivity of 98.71%, a precision of 99.21%, a specificity of 98.56%, and an AUC of 99.28%.  
Figure 12: Confusion matrix of the ANN to classify the first dataset based on the hybrid features. (**a**) ResNet-50, GLCM, DWT and LBP. (**b**) GoogLeNet, GLCM, DWT and LBP.  
Secondly, for the second dataset, when the ANN was fed with the hybrid features extracted by ResNet-50, GLCM, DWT and LBP, it obtained an accuracy of 99.8%, a sensitivity of 99.54%, a precision of 100%, a specificity of 99.68%, and an AUC of 99.82%. In contrast, when the ANN was fed with the hybrid features extracted by ResNet-50, GLCM, DWT and LBP, it obtained an accuracy of 99.3%, a sensitivity of 98.5%, a precision of 99.41%, a specificity of 98.66%, and an AUC of 99.32%.  
Figure 14 presents the performance of the ANN when classifying the two X-ray datasets for the early detection of tuberculosis.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Datasets** & \multicolumn{2}{c}{**First Dataset**} & \multicolumn{2}{c}{**Second Dataset**} \\ \hline
**Hybrid Features** & **ResNet-50, GLCM,** & **GoogLeNet, GLCM,** & **ResNet-50, GLCM,** & **GoogLeNet, GLCM,** \\  & **DWT and LBP** & **DWT and LBP** & **DWT and LBP** & **DWT and LBP** \\ \hline Accuracy \% & 99.2 & 98.5 & 99.8 & 99.3 \\ Sensitivity \% & 99.23 & 98.71 & 99.54 & 98.5 \\ Precision \% & 99.5 & 99.21 & 100 & 99.41 \\ Specificity \% & 99.41 & 98.56 & 99.68 & 98.66 \\ AUC \% & 99.78 & 99.28 & 99.82 & 99.32 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Results of the ANN classifier based on the hybrid features for the two tuberculosis datasets.  
Figure 14: Displaying the performance of the ANN when classifying two tuberculosis datasets.  
Figure 13: Confusion matrix of the ANN to classify the second dataset based on the hybrid features. (a) ResNet-50, GLCM, DWT and LBP. (b) GoogLeNet, GLCM, DWT and LBP.