Brain Tumor Classification based on Improved Stacked Ensemble Deep Learning Methods

Objective: Brain Tumor diagnostic prediction is essential for assisting radiologists and other healthcare professionals in identifying and classifying brain tumors. For the diagnosis and treatment of cancer diseases, prediction and classification accuracy are crucial. The aim of this study was to improve ensemble deep learning models for classifing brain tumor and increase the performance of structure models by combining different model of deep learning to develop a model with more accurate predictions than the individual models. Methods: Convolutional neural networks (CNNs), which are made up of a single algorithm called CNN model, are the foundation of most current methods for classifying cancer illness images. The model CNN is combined with other models to create other methods of classification called ensemble method. However, compared to a single machine learning algorithm, ensemble machine learning models are more accurate. This study used stacked ensemble deep learning technology. The data set used in this study was obtained from Kaggle and included two categories: abnormal & normal brains. The data set was trained with three models: VGG19, Inception v3, and Resnet 10. Result: The 96.6% accuracy for binary classification (0,1) have been achieved by stacked ensemble deep learning model with Loss binary cross entropy, and Adam optimizer take into consideration with stacking models. Conclusion: The stacked ensemble deep learning model can be improved over a single framework.


Introduction
Cancer is a leading cause of death worldwide, and it claimed nearly 10 million lives in 2020, or the equivalent of nearly one death out of every 6 deaths, according to the World Health Organization (WHO) on its website. A brain tumor is a mass or growth of abnormal cells in the brain. There are different types of brain tumors. Some are noncancerous (benign), and some are cancerous (malignant). A brain tumor may begin in an area of the brain (a "primary brain tumor"), or cancer may begin elsewhere in the body and spread to the brain as secondary (metastatic) brain tumors. The speed of brain tumor growth varies widely. The tumor's growth rate and location determine how it affects the function of your nervous system. Brain tumor treatment options depend on the type, size, and location of the tumor. The size, location, and rate of growth of a brain tumor all affect the visible symptoms and signs. Brain tumor-related general signs and symptoms may include: the beginning of new headache attacks or a shift in headache patterns that gradually get worse and occur more often vomiting or nausea without causing vision issues such as double or blurry vision or reduced peripheral vision gradual loss of sensation or motion in a leg or arm challenging balancing. A classification one of most important task in deep learning. Classification typically consists of two components: features extraction and a classifier-based classification technique. Features extraction is a key step in pattern recognition, which predicts an object based on its essential characteristics like shape, color, names, and a few others. However, classifier performance is influenced by the strength of the recovered attributes. One of the most effective machine learning methods is ensemble learning, which uses the combined results of two or more models deep learning or weak learners to address a specific computational intelligence challenge (Mohan et al., 2022;Mateen et al., 2019). Machine learning ensemble models in a variety of ways, including boosting, bagging, and stacking. Stacking is one of the most popular ensemble machine learning techniques, which forecasts several nodes to produce a new model and improve model performance. stacking technique have high ability in training. Different issue that relate medical fields solved by deep learning included many algorithms that have several structure and different properties (Saraiva et al., 2019;Bakht et al., 2021;Gupta et al., 2022;Hameed et al., 2020;Hamida et al., 2021;Junaidi et al., 2021;Kandel et al., 2021;Khan et al., 2020;Khan et al., 2021;Kundu et al., 2021;Mohan et al., 2022;Rahman et al., 2022;Vigier et al., 2021;Xiong et al., 2021;Yadav et al., 2021). Additionally, for effective surgical planning, identifying and forecasting brain disease, a precise categorization permitting a batter differentiation of sick tissues and normal tissues of the MRI image has become crucial (Gupta et al., 2022). Currently, scientists have made significant progress in properly recognizing the outlines of various brain tissues, making it possible to estimate the amount of lesions in the brain automatically and accurately The classification of brain tumors using pre-trained, VGG-19, Inception-3, and Resnet 101 approaches is covered in this article.
Study by El Hamdaoui et al., (2021) focuses on using images from the risk of malignancy index (RMI) to identify and classify brain tumors. They employed deep transfer learning and concept stacking. Seven convolutional neural network (CNN) architectures have been selected, each of which has already undergone pre-training on an ImageNet dataset that perfectly matches brain tumor magnetic resonance imaging (MRI) data gathered from the brain tumor segmentation (BraTS) 19 database. The effectiveness of their primary 2-class model high grade gliomas (HGG) and low grade gliomas (LGG) was evaluated using 10 way cross validation method.
Study by Khan et al., (2020) have been describe a deep learning-based automated multimodal classification technique for classifying different types of brain tumors. There are five main steps in the suggested procedure. In the first step, the discrete cosine transforms, and edgebased histogram equalization are used to implement the linear contrast stretching (DCT). Deep learning feature extraction is part of the second stage. Two pre-trained convolutional neural network (CNN) models, VGG16 and VGG19, were employed for feature extraction via transfer learning. The extreme learning machine (ELM) and a combined learning technique based on correntropy were both used to select the best features in the third stage. In the following phases, the robust covariant features based on partial least squares were combined into a single matrix (PLS). ELM received the categorization matrix for the composite.
Study by Filatov and Yar, (2022) made an effort to replace the manual method of diagnosis with machine learning. They suggested using convolutional neural networks (CNN) that have already been trained for the diagnosis and classification of brain cancers. One class of non-tumor MRI pictures was used to categorize three different types of tumors. ResNet50, EfficientNetB1, EfficientNetB7, and EfficientNetV2B1 are some of the networks that have been used. Efficient Net's scalable nature has produced encouraging outcomes. The most accurate model, EfficientNetB1, had training and validation accuracy of 87.67% and 89.55%, respectively. Study by Akinyelu et al., (2022) have included Convolutional neural networks (CNNs), which are included, are one of the successful Deep Learning (DL)based methods that have been applied to the diagnosis of brain tumors. However, they are unable to effectively handle input changes. To solve the shortcomings of CNNs, a novel sort of machine learning architecture known as capsule neural networks (CapsNets) was recently created. CapsNets are advantageous for processing medical imaging datasets because they are robust to rotations and affine translations. Moreover, Vision Transformers (ViT)-based solutions have been very recently proposed to address the issue of long-range dependency in CNNs. This article offers a thorough description of brain tumor classification and segmentation techniques based on CNN, CapsNet, ML, and ViT, among others. The survey emphasizes the basic contributions of modern research and the effectiveness of cutting-edge methods. In addition, we provide a thorough analysis of significant problems and open difficulties. We also point out several significant drawbacks and encouraging future research directions. We believe that this poll will be a useful starting point for additional research. The primary objective of our research is to highlight the current state-of-the-art of TL (transfer learning)-based to classify most risk diesis tumor brain. This essay also examines the frameworks of each model, identifies current research problems. The main contributions of the present paper focus on three finetuned variations of (VGG19, InceptionResNet_V3 and ResNet101)]. We employed two steps in stacking at the first training the data set after that regularizes and then in second step classify. The pre-processing to prevent overfitting in several models, to create single and ensemble models, we merge three and fine-tuned models, at the end evaluated the performance of the single and ensemble models utilized in this study by testing them on tumor brain datasets. The rest of paper at section 2 materials and method, section 3 result, section4 discussion.

Materials and Methods
The main concept in this investigation provides an explanation of the study's methodology. The Kaggle data set was used to build the architecture of the pre-trained models VGG-19, Inception V3, and Resnet 101. These pre-trained models were applied to MRI images for binary categorization into two classes. The methods used in this study to complete the task involved several of the steps depicted in Figure 1, which explains the steps of the suggested methodology detailed in the next sections.

Dataset 1
In this paper, we used the brain tumor dataset proposed Figure 1. Shows the Flowchart, which Explains the Steps of Algorithm providing a way of explaining complex data to presenting as a hypothesis (Saraiva et al., 2019;Biswas et al., 2021;Saha et al., 2020).
Scientists have put out a variety of models to explain or forecast potential outcomes in various situations. (Simonyan and Zisserman, 2015;He et al., 2016). One of most famous model is AlexNet came out in 2012 (Alex Krizhevsky, 2012) and it improved on the traditional Convolutional neural networks. More information on the pre-trained models used in this study is provided in the following section.

Vgg19.2.1
VGG19 is a type of a CNN (convolutional neural network) with 19 layers. The concepts of its predecessors are carried over and enhanced in VGG, which was created by a distinct group at Oxford known as the Visual Geometry Group (Simonyan and Zisserman, 2015). It expands on the ideas of preceding systems, incorporates their principles, and adds deep convolutional neural layers to enhance accuracy. VGG is advanced CNN that is used to recognize images. The network used a fixed-size (224 * 224) RGB image as input, suggesting that the matrix was formed, and the data set's features were (224,224,3). Calculating the average RGB value of each pixel throughout the whole training set was the only preprocessing that was performed.
They were able to completely cover the image using kernels that were 3 × 3 pixels in size and a stride size of 1 pixel. To maintain the spatial resolution of the image, spatial padding was applied. Instead, then using tanh or sigmoid functions like earlier models did, this one used max pooling 2 x2 pixel windows with Stride 2. ReLu by kaggle which is available online for free athttps://www. kaggle.com/datasets/navoneel/brain-mri-images-forbrain-tumor-detection. The dataset contains brain images classified from normal and abnormal. Figure 2 illustrates the sample of date used in this paper before preprocessing.

Pe-processing 1.1
The data set images must be the same size as the network's input for the network to be trained and to make predictions on new data. Therefore, it is necessary to scale or crop the data to the proper size after adjusting the size of the images to fit the network. To enhance the quantity of data sets and avoid the limitations of training models, the first step was data augmentation. The zoom range is 0.1, the rotation, horizontality, and brightness ranges are 0.5 and 1.0, respectively, and the preprocessing ranges for image rescaling, width shift, and height shift are each 0.1. The dataset will then be split into training and validation groups, with 80% of the dataset going toward training and 20% going toward validation.

Pre-trained models 2.0
A pre-trained model is models used to solve many tasks pre-trained models or stored networks are those that have been previously trained on a sizable dataset, generally on a sizable image-classification task. In this section we describe the models we have used for task classification. A pre-trained model is substantially more accurate than a convolution neural network (CNN) that was specifically designed for the task. Therefore, when doing image classification tasks, it would make sense to begin with a pre-trained model as it is almost always the optimal line of action. Models have a variety of uses from a. Normal brain image b. Tumor brain image (Rectified linear unit), which introduced non-linearity to the model and sped up processing, was introduced after that. created three completely linked layers, the first two of which were 4,096 in size, the third of which was 1,000-channel layer for 1000-way ILSVRC classification. This model is employed to detect lesions (Sudha and Ganeshbabu, 2021). VGG-19 was employed in this investigation to categorize tumor brain. The model was initially loaded with data, and its tuning fin was initially freezing the layers. The Adam optimizer was used. Training took many hours for training, batch size was 64, and epoch 25 to produce the result. Model: "sequential," Total parameters: 20,049,473, Trainable parameters: 25,089; non-trainable parameters: 20,024,384. The final VGG19 model results are shown in figure 3 explain loss and accuracy. The value of accuracy, precision, recall, f1-score are 92%,97%, 91%,94% respectively.

Inception V3
The Inception V3 model is simply the improved and updated Inception V1 model (Szegedy et al., 2016). The Inception V3 model used a variety of techniques to tune the network for best model adaption. Compared to the Inception V1 and V2 models, it is more efficient and has a wider network, but its speed is unaffected. Calculation is less expensive. They make use of auxiliary classifiers as regularizes. The 2015-released Inception V3 Model Architecture includes 42 total layers and a reduced error rate than its predecessors (Visuña et al., 2022;Saha et al., 2020). The introduction of auxiliary classifiers, factorization into small convolutions, spatial factorization into asymmetric convolutions, and effective grid size reduction are the main changes made to the Inception V3 model. In this investigation, where we additionally froze the layer, these models were used as additional models in stacking learning. Inception V3's parameters total: 21,933,857, 131,073 trainable parameters, 21,802,784 untrainable parameters, and epochs 25. The final classification of the MRI data set using Inception V3 is shown in Figure 4, explain loss and accuracy. The value of recall, precision & f1-scoreare 97%. the accuracy 96%.

Resnet 101
A specific kind of neural network called ResNet, sometimes known as the Residual Network was first introduced in, (He et al., 2016). Deep neural networks typically perform better and are more precise when tackling complicated issues when they have more layers. (Vision et al., 2020). When deep networks are being trained, accuracy reaches a saturation threshold, at which time it rapidly deteriorates. This issue is referred to as "degradation." This demonstrates how not every neural network architecture is simple to optimize. To address this problem, ResNet employs a method known as "residual mapping.", below is the building block of a Residual network in Figure 5 (He et al., 2016).
The formulation of F(x)+x can be realized by feed forward neural networks with shortcut connections. Many problems can be addressed using Resnets (El Asnaoui, 2021). When the depth of the network increases, they are simple to tune and attain more accuracy, producing outcomes that are superior to those of earlier networks. A residual neural network's architecture is substantially simpler during training and contains fewer filters than a VGG. By adding a shortcut connection, the network is converted into its comparable residual version. This shortcut connection achieves identity mapping by padding the dimensions with additional zero entries. This decision doesn't introduce any new parameters. The third model employed in this research on the MRI data set is Resnet101 (tumor brain). 42,726,913 total parameters 100,353 trainable parameters; 42,626,560 non-trainable parameters. The final classification of the MRI data set using ResNet101 is shown in figure 6 explain loss and accuracy, the value of precision recall f1-score is 1.00. The accuracy is 1.00.  DOI:10.31557/APJCP.2023.24.6.2141 Stacking Ensemble Learning Stacking ensemble learning (Elmousalami and Hassanien, 2020) involves merging various methods after using them to learn a portion of the problem area. Stacking paradigms enhances total accuracy more than any other individual-based learning method. The stacking model's two main implementation tiers Inception V3, Resnet 101, and VGG-19 are the three models that make up the main stage; each model produces unique classifications. The second stage has been represented by the generalizer, who assembles the final classification from each learner's classification. The stacking ensemble models employed in this experiment are described in Figure 7.
The training phase of the ensemble of multiple CNN models in this scenario uses the 2-class MRI data to train the deep CNN models first individually. When analyzing the MRI images, the decision-fusion strategy is considered. Decision fusion, to describe it simply, is the process of integrating the final conclusions made by various classifiers. Here, the classification on the test dataset, which is the prediction on the test dataset, serves as the classifier's choice. Using each of the trained CNN models, predictions are made for each of the test images.
Through the training of blocks, we need to set each mode in the stack as explained in Table 4. By considering the features of the three models' forecasts, we mean the maximum voting criterion is used to combine the predictions made by several models into a single prediction where data set included normal image label 0 and abnormal label 1 as shown in Figure 8.
Using a multitude of effective models to carry out classification or regression tasks and obtain results that surpass all individual models in the ensemble is one advantage of stacking. Comparatively to individual models, ensemble approaches offer higher predictive accuracy. When a dataset comprises both linear and non-linear types of data, ensemble methods are highly helpful since different models can be coupled to manage

Results
This section covered the experimental findings of a classifier utilizing the suggested image preprocessing method. Image data sets from the KAGGLE dataset were used for image extraction and classification using features. Through training and testing, the classifier's performance will be evaluated to predict the case of an image. On the dataset, an 80% test: 20% validation was used. After loading data sets on brain tumors to three distinct deep transfer learning models (VGG19, Inception V3, and Resnet 101), we present the confusion matrix and its curves in Figure 9, which give a summary of the results of a brain tumor categorization prediction problem. Count numbers are used to report the accurate and incorrect prediction shares for each class. The result showed that the stacking model produced significantly better outcomes than each model considered separately. We calculated the average values of the F1 score, sensitivity, accuracy, and precision for each CNN network to assess the performance of our stack deep transfer learning model during its training phase. Table 1 shows the topologies of the VGG19, InceptionV3 network, and ResNet101 network that provided the setting for stacking. Additionally, the use of the stacking model has substantially enhanced the performance of the suggested models. The predictions of

Components of models Setting
Training data size 80% Validation data size 20 Optimizer Adam

Discussion
Through training as shown in figures 10, 11, and 12 of stacking deep learning Vgg19, Inception V3, and Resnet 101 have good results as mentioned in the previous section that make Systems that plan and make decisions for patients and send alerts to medical devices or electronic health records when changes in their status occur can be created using deep learning algorithms. This can ensure that patients receive proper care at the appropriate time for them. Systems that plan and decision-making patients and send alerts to medical devices or electronic health records when changes in their status occur can be created using deep learning. This makes decisions for patients to receive the proper care at the appropriate time for them. Despite the development of deep learning stacking models in various fields of life and their inclusion in medical specialties, there remain obstacles that cannot be implemented in all circumstances, as artificial intelligence algorithms require enormous computational resources. Problems require an almost astronomical amt of memory and time; that is, it becomes unrealistic when this problem exceeds a certain size, so scientists' continuous search for algorithms that are more capable of solving these problems is a top priority so far.
In conclusion, in this work, we have put forward a smart clinical decision support system for the RMI image classification of brain tumors. We have suggested a strategy based on stacking models to get around the issue of the lack of labeled training data required to train convolutional neural networks. With deep pre-trained models, we have solved the issues of a lack of query able data and the high cost of computing complex layer parameters during lengthy validation processes. We have increased the final precision of our model by using the stacking model. Three CNN architecture models that had already been trained on a medical image dataset (VGG19, Inception V3&Resnet101) were used for this, and they were precisely fitted to a collection of brain tumor photos obtained from Kaggel.com. Only the last layers of each network were trained using the MRI image dataset we acquired because the weights of the earlier levels had previously been pre-trained. We were able to guarantee our model's quick and accurate convergence using this method. Increase the performance of block models by stacking them through training.

Author Contribution Statement
The stacking ensemble learning focuses how we can use different of deep learning vgg19, Inception V3, and Resnet in medical image processing..