## 4 Results and Discussion
### Comparison with Pre-Trained Models  
Transfer learning models are frequently used in brain tumor classification [33; 34; 35]. Thanks to the use of these models, training time is accelerated and the performance of the model is increased by using pre-trained neural networks. Instead of training a model with large datasets, it is sufficient to retrain only the last layers in pre-trained models. In addition, visual features are well learned and images are classified more successfully with these features. In this study, DenseNet121, ResNet50, EfficientNetB5, VGG19, Xception, InceptionV3 and MobileNetV2 from pre-trained models were used for performance comparison. For the training and validation processes of the proposed model and pre-trained models, Figures 9 and 10 show the accuracy and loss values, respectively. Although VGG19 is stable in training accuracy and loss, there are significant fluctuations in validation accuracy and loss. This shows that the model overfits the data and has difficulty in generalizing to new data. Although the other models have occasional fluctuations in terms of accuracy and loss, they appear to be models that give balanced results. The proposed model's training and validation loss decreases in parallel, and its training and validation accuracies almost overlap. This shows that the model is resistant to overfitting and has a better generalization performance. As a result, the proposed model stands out as the model that performs better than other models, with small difference between the training and validation curves, a continuous decrease in loss values and high accuracy rates. Figure 9: Training and validation accuracy curves. (**a**) DenseNet121, (**b**) ResNet50, (**c**) EfficientNetB5, (**d**) VGG19, (**e**) Xception, (**f**) InceptionV3, (**g**) MobileNetV2, and (**h**) the proposed model. Figure 10: Training and validation loss curves. (**a**) DenseNet121, (**b**) ResNet50, (**c**) EfficientNetB5, (**d**) VGG19, (**e**) Xception, (**f**) InceptionV3, (**g**) MobileNetV2, and (**h**) the proposed model. The pre-trained models' confusion matrices are shown in Figure 11 and the test accuracy and loss values of these models are shown in Table 9. It misclassified only three samples and showed a more successful performance than all of the other models, with a 99.77% accuracy rate. It was by far the most successful model, achieving the highest accuracy and lowest loss value. InceptionV3 and DenseNet121 achieved the closest results to the proposed model by exhibiting high performance, with 98.5% and 98.3% accuracy rates, respectively. Xception (98.1% accuracy, 0.086 loss) and EfficientNetB5 (97.4% accuracy, 0.090 loss) models have lower performance due to their slightly higher loss values. ResNet50 is less successful than the other models with a 96.3% accuracy rate. VGG19 (92.7% accuracy, 0.196 loss) and MobileNetV2 (96.1% accuracy, 0.247 loss) are models with the lowest accuracy and high loss values, and have lower performance when compared with the others. Overall, the proposed model minimizes misclassifications for four tumor types and gives more successful results. The features extracted by a customized CNN structure were combined with a powerful machine learning algorithm such as XGBoost to provide higher classification accuracy. CNN is quite effective in extracting low- and high-level features from images, but in some cases it may have difficulty with more complex data. XGBoost, on the other hand, can perform more accurate and faster classifications using tree-based structures, especially in cases where the number of features is large and there are complex data relationships. The combination of CNN + XGBoost combines the advantages of both models. While CNN extracts high quality features, XGBoost evaluates the importance of these features and optimizes the classification process. In addition, as the size of the dataset used in the study is relatively small, pre-trained models carry the risk of over-training.