# Classifying Breast Density from Mammogram with Pretrained CNNs and Weighted Average Ensembles
## 5 Conclusions  
Breast density describes the amount of fibrous and glandular tissue in a breast compared with the amount of fatty tissue. Breast density plays a significant role in detecting breast cancer and on the risk of developing breast cancer. Dense breasts are more likely to be affected by breast cancer. The Breast Imaging-Reporting and Data System (BI-RADS) is an assessment standard for reporting the breast cancer risk based on a mammogram image. It sorts breast density into one of four ACR classes. In class A, breasts are almost entirely fatty. A few areas of dense tissue are scattered within the breasts in class B. In class C, the breasts are heterogeneously dense. Finally, in class D, the breasts are extremely dense. In this paper, a breast density classification model from mammograms was developed. The model is based on pre-trained CNNs and weighted average ensembles. The dataset was collected from King Abdulaziz Medical City under the supervision of the King Abdullah International Medical Research Center (KAIMRC). The dataset consists of 879 mammogram screenings. Several model pre-trained convolutional neural networks were applied, including ResNet, Inception, DensNet, vgg16, vgg19, InceptionResNetV2, \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Confusion Matrix**} & \multirow{2}{*}{**Precision**} & \multirow{2}{*}{**Recall**} & \multirow{2}{*}{**F1**} \\  & **A** & **B** & **C** & **D** & & \\ \hline
**A** & 106 & 27 & 0 & 0 & 0.76 & 0.80 & 0.78 \\ \hline
**B** & 26 & 173 & 26 & 2 & 0.73 & 0.76 & 0.75 \\ \hline
**C** & 8 & 36 & 167 & 5 & 0.79 & 0.77 & 0.78 \\ \hline
**D** & 0 & 0 & 19 & 22 & 0.76 & 0.54 & 0.63 \\ \hline \multicolumn{5}{c}{**Accuracy**} & \multicolumn{5}{c}{0.758} \\ \hline  & \multicolumn{3}{c}{**Overall F1 score**} & \multicolumn{5}{c}{0.76} \\ \hline \hline \end{tabular}
\end{table} 
Table 18: Weighted average ensembles with best 3 models. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Ensembles** & **Accuracy** & **F1 Score** \\ \hline Averaging all models & 74.70\% & 74\% \\ \hline Weighted average with best 5 models & 77.95\% & 78\% \\ \hline Weighted average with best 4 models & 78.11\% & 78\% \\ \hline Weighted average with best 3 models & 75.85\% & 76\% \\ \hline \hline \end{tabular}
\end{table} 
Table 20: Ensembles for superclass classification. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Confusion Matrix**} & \multirow{2}{*}{**Precision**} & \multirow{2}{*}{**Recall**} & \multirow{2}{*}{**F1**} \\  & **A** & **B** & **C** & **D** & & \\ \hline
**A** & 107 & 26 & 0 & 0 & 0.77 & 0.80 & 0.79 \\ \hline
**B** & 23 & 181 & 20 & 2 & 0.75 & 0.80 & 0.77 \\ \hline
**C** & 9 & 34 & 169 & 4 & 0.82 & 0.87 & 0.80 \\ \hline
**D** & 0 & 0 & 16 & 25 & 0.81 & 0.61 & 0.69 \\ \hline  & \multicolumn{3}{c}{**Accuracy**} & \multicolumn{5}{c}{0.7811} \\ \hline  & \multicolumn{3}{c}{**Overall F1 score**} & \multicolumn{5}{c}{0.78} \\ \hline \hline \end{tabular}
\end{table} 
Table 17: Weighted average ensembles with best 4 models. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Confusion Matrix**} & \multirow{2}{*}{**Precision**} & \multirow{2}{*}{**Recall**} & \multirow{2}{*}{**F1**} \\  & **A** & **B** & **C** & **D** & \\ \hline
**A** & 106 & 27 & 0 & 0 & 0.76 & 0.80 & 0.78 \\ \hline
**B** & 26 & 173 & 26 & 2 & 0.73 & 0.76 & 0.75 \\ \hline
**C** & 8 & 36 & 167 & 5 & 0.79 & 0.77 & 0.78 \\ \hline
**D** & 0 & 0 & 19 & 22 & 0.76 & 0.54 & 0.63 \\ \hline  & \multicolumn{3}{c}{**Accuracy**} & \multicolumn{5}{c}{0.758} \\ \hline  & \multicolumn{3}{c}{**Overall F1 score**} & \multicolumn{5}{c}{0.76} \\ \hline \hline \end{tabular}
\end{table} 
Table 19: Ensembles for ACR classification. EfficientNetV2, and Xception. Among these models, InceptionV3, EfficientNet 2B0, and Xception gave the highest accuracy in both four- and two-class classification. We noticed from monitoring the performance of each model that some models performed better with specific classes.