## 3 Methodology
### Computational Methodology of the Proposed Ensemble Model  
In this section, we present our proposed ensemble model for the multi-class classification of breast cancer histopathology images. Four pre-trained DCNNs are utilized as deep feature extractors, namely; ResNet50, DenseNet201, EfficientNet-B0, and ResNet18. Our choice of pre-trained ConvNets was to reduce the training time and leverage the powerful image features learned from training on a large image dataset such as ImageNet. Further, pre-trained ConvNet models were evaluated using the benchmark image dataset, ImageNet [46]. More so, the idea is to bring together the good features generated by variant ConvNets structures (ResNet50, DenseNet201, EfficientNet-B0, and ResNet18) and pooled them as the features input to the SVM model for classification. Figure 11 illustrates the multi-scale pooled image feature representation (MPIFR) method proposed for this study and Figure 12 depicts the complete computational process end-to-end, from input to output. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Subtype** & **No. of Patients** & **No. of Images** \\ \hline Benign & Adenosis & 4 & 444 \\  & Fibroadenoma & 10 & 1014 \\  & Phylodes tumor & 3 & 453 \\  & Tubular adenoma & 7 & 569 \\ \hline Malignant & Ductal carcinoma & 38 & 3451 \\  & Lobular carcinoma & 5 & 626 \\  & Mucinous carcinoma & 9 & 792 \\  & Papillary carcinoma & 6 & 560 \\ \hline  & Total & 82 & 7909 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The distribution of benign and malignant images over various subtypes. Figure 10: Sample of malignant subtypes: (**A**) ductal carcinoma; (**B**) lobular carcinoma; (**C**) mucinous carcinoma; (**D**) papillary carcinoma. The cancer images are the input datasets to the three convNet models, which utilize unsupervised learning (as described in Section 2.2) to extract features from the input images. Each of the baseline models utilizes SoftMax as an output function for multi-class problems. However, in this study, we use the one-vs-one technique with SVM for the eight-class classification of the 8 cancer subtypes from breast cancer images. Recall that SoftMax is a generalization of logistic regression, and logistic regression is susceptible to overfitting. Replacing SoftMax with SVM will guarantee convergence. As it is well known, the cost function of SVM is convex. In the one-vs-one technique, a pairwise SVM classifier of the breast cancer image classes is modeled using the training features extracted. A total of 28 SVM classifiers are built for the 8 classes of breast cancer datasets based on the \(\frac{(k\times(k-1))}{2}\) formula where \(k\) is the number of classes. Finally, a test breast cancer image is predicted based on the class output of the SVM models with a majority of counts. This model uses a heuristic technique to classify into one target class. This method is different from the previous method in [53], which first classifies input data into benign or malignant binary classes before being further categorized using two modules; one for benign and the other for malignant. Each module contains a ConvNet structure with a decision tree for subclass classification. To further explain the proposed ensemble model mathematically, consider \(X_{i}\) as a feature vector extracted from an input image by a pre-trained ConvNet baseline \(i\). \(i\) is a concatenation of features extracted from the input image by convNet baselines \(i=1,2...,n\). In this study, \(n=4\) for the four baselines pre-trained convNets used in this study. Recall that in Equation 2, \(h(x)\) is defined as the SVM learning model. Thus, \(h_{j}(X)\in H(X)\), where \(H(X)\) is the set of SVM learning models, and \(h_{j}(X)\) is an individual SVM classifier for a pair of class \((y_{d},y_{l})\). \(j=1,2,...,m\) indicates the number of classifiers, \(d=1,2,...,k-1\), and \(l=1,2,...,k\). In this study, \(k=8\) and \(m=28\) indicate the number of breast cancer classes and the total number of SVM classifiers, respectively.