# A Linear Discriminant Analysis and Classification Model for Breast Cancer Diagnosis
## 4 Results and Discussions
### Random Forest Classifier  
In a random forest classifier, many individual decision trees collaborate to harvest a single output. The random forest is a collection of trees, each of which makes a classification prediction; the classification with the most votes determines the model's prediction. In the first step after LDA, this classifier is applied to the newly acquired data. Confusion matrices for the random forest categorized portion are displayed in Figure 2. The percentages add up to 65 for the true positive rate (_TP_), two for false positives (_FP_), three for false negatives (_FN_), and 44 for true negatives (_TN_). Confusion matrices for data fed directly into the random forest classifier without previously being processed by LDA are displayed in Figure 3; these matrices reveal a true positive rate (_TP_) of 64, a false positive rate (_FP_) of three, a false negative rate (_FN_) of three, and a true negative rate (_TN_) of 44. Figure 3: Confusion Matrix for Wisconsin Breast Cancer Dataset Without LDA Using Random Forest (\(TP=64\), \(FP=3\)_FN_ = 3_TN_ = 44). Figure 2: Confusion Matrix for Wisconsin Breast Cancer Dataset with LDA Using Random Forest (\(TP=65\), \(FP=2\)_FN_ = 3_TN_ = 44). The results of the performance of the dataset after being passed through the random forest classifier, where the classifier achieved accuracy = 95.61, precision = 97.0, recall/sensitivity = 95.6, F1 score = 96.3, specificity = 95.7. The decision boundary of a support vector machine is optimized to cut down on over-generalization. It is a flexible machine-learning model that handles linear and nonlinear classification, regression, and outlier detection with ease. When the LDA-refined dataset is complete, it is sent into a support vector machine classifier. Confusion matrices for the SVM-classified subcomponent are displayed in Figure 4. The sensitivity is 66, the specificity is one, the false negatives are three, and the specificity of the real negatives is 44. As can be seen in Figure 4, when the dataset was fed directly into the SVM classifier without first being run via LDA, the results indicated a true positive rate (_TP_) of 63, a false positive rate (_FP_) of five, a false negative rate (_FN_) of four, and a true negative rate (_TN_) of 43. Figure 5 shows the results of SVM without LDA. After applying the SVM classifier to the dataset, the results are depicted in Figure 5; these show an accuracy of 97%, a precision of 99%, a recall of 96%, a sensitivity of 97%, an F1 score of 97%, and a specificity of 97%. In this research, data classification is carried out using random forest and SVM, therefore the data are sent into these classifiers after having been subjected to feature extraction using LDA. Table 1 displays the evaluation metrics used to analyze the experimental confusion matrices. Figure 4: Confusion Matrix Results for Wisconsin Breast Cancer Dataset with LDA Using SVM (_TP_ = 66 _FP_ = 1 _FN_ = 3 _TN_ = 44). The accuracy of this study's prediction method was commensurate with its predecessors (as shown in Table 2). The accuracy rate in determining breast cancer was the goal of the proposed methodology and this goal was met when compared to other predictions in the literature.