## 3 Proposed Methodology
### XG-Boost(XGB)  
It is a combination of both classification and regression tree sets, making it an ensemble model classification and regression tree. On the other hand, XGB [2] is used for issues of supervised learning and enhances patterns based on structure. A representation of the XG-Boost prediction model may be seen in Figure 2. The modification to XG's learning base tree structure results in an improvement to XG-Boost. ``` Input: MRI image dataset with label Output: Segmented images 1.1 Define weight and parameters X= \(X_{0}\) and \(\theta=\theta_{0}\) 1.2 Every image i, do 1.3 Run iteration = number of pixels 1.4 Apply CNN 1.5 Define activation function in Equation (1) 1.6 Calculate and cluster patch Equation (2) 1.7 Every iteration calculate cost function by step 1.8 For all patches \(P_{l}^{[x,y,z]}<-P^{[x,y,z]_{i-1}}+\sigma[\bigtriangleup^{[\bigtriangleup^{[x,y, z]_{i}}}-1]\)  Where \(\sigma\) < Learning Parameters(0 to 1) 1.9 Optimize Conditional Random Field \(X<-\,argmin_{x}\,E(X,x^{(n)};\,\mu,\theta)\,\,\,-C(\theta;\,\,\,\,\,\,\,\,\,\, \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,



### Performance Metrics

The four-efficiency metrics used to evaluate the performance of the suggested method are listed in the following section. Other available performance metrics are all variants of the given performance metrics. One of the four main performance metrics is accuracy, which provides an overall picture of model performance. Other performance metrics, such as Recall, Precision and F-Score are used to analyze the true positive and true negative rate of the proposed model by using Equations (8)-(11). **Accuracy**: This accuracy metric provides definitions for the labeled photos of Pituitary, Meningioma, and Glioma tumors. Equation (8) is what decides how accurate the suggested model is, and it is this equation. \[Accuracy=\frac{TP+TN}{TP+TN+FP+FN} \tag{8}\]

In Equation (8), _TP_ refers to samples that have been accurately categorized as positive, while _TN_ refers to those that have been correctly classified as negative. While _FP_ represents samples that have been wrongly classed as being properly classified, _FN_ represents samples that have been correctly classified as being incorrectly categorized. **Recall**: It is used to measure the percentage of real positive instances that we were able to accurately forecast using our algorithm. Equation (9) is used in the computation of the recall metric. \[Recall=\frac{TP}{TP+FN} \tag{9}\]

**F-Score**: It is used as means of expressing harmonic mean of precision and recall. It will only accept samples that have been positively identified as pituitary, meningioma, or glioma. The F-Score is determined by applying Equation (10) to the data. \[F\text{-}Score=\frac{2 TP}{2 TP+FP+FN} \tag{10}\]

**Precision:** It is used to measure how many of the correctly predicted cases actually turned out to be positive. \[Precision=\frac{TP}{TP+FP} \tag{11}\]

### Results and Analysis

This subsection contains the proposed system's experimental results. As mentioned previously, the suggested methodology is assessed using two distinct datasets. Additional tests, such as the F-score, recall, Precision and Accuracy, are utilized to ascertain the experimental outcomes. The proposed system consists of a CNN-CRF based network for segmentation and Resnet-XG-Boost framework for classification and feature mapping. It compared the original dataset to the augmented dataset. The experimental findings of the proposed system are also compared to those of other classification methods used in existing brain tumor detection systems. Tables 2 and 3 show the confusion matrices for the proposed BTC system's classification outcome for both datasets. \begin{table}
\begin{tabular}{l l l l} \hline \hline Meningioma & 100 & 5 & 1 \\ Glioma & 3 & 197 & 0 \\ Pituitary & 6 & 0 & 300 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Confusion matrix of three classes’ tumors.