Application of Feature Engineering for Breast Cancer Tumor Detection

 

Application of Feature Engineering for Breast Cancer Tumor Detection

Ashley Chang

Abstract

Breast Cancer is the most prevalent cancer, being one of the top five causes of mortality. During breast cancer screenings, it is important for doctors to determine whether a tumor is benign (non-cancerous) or malignant (cancerous) in order to determine the patient's prognosis and course of treatment. However, inconsistent interpretation of ultrasound images by doctors can result in incorrect diagnoses and treatments, affecting patient care and outcomes. Thus, in this study, a machine learning model was built using convolutional neural networks (CNN) to help with the diagnosis and classification of breast cancer tumors.


A dataset containing 800 images separated into normal, benign, and malignant breast cancer ultrasounds was acquired and uploaded into Jupyter Notebook. Custom data augmentation techniques were applied to the images to increase data variation. Regularization techniques were also used to prevent the case of overfitting. The model was run for 10 epochs and then evaluated for its performance in tumor classification.


The model's accuracy was an average of 0.87 whereas its model loss value obtained an average of 0.5. Overall, there was a consistent case of the training set performing at a better level than the validation set.


These results indicate an issue with underfitting, however, the model still performed relatively well. This further illustrates the extent to which feature engineering can be applied to enhance tumor classification. With additional development, this model could be applied to mobile applications and in the future assist doctors in real-world situations.


Introduction

Breast cancer is the second most prevalent cancer diagnosed globally which primarily affects women. It is often prompted by the growth of cancer cells that arise from mutated breast tissue cells, which eventually aggregate to form a lump or mass. These tumors that arise from breast cancer are one of the most significant features of the disease. Tumors are masses of tissue that fall into one of two categories: benign or malignant. A doctor's knowledge of whether a patient's tumor is cancerous (malignant) or non-cancerous (benign) is essential for determining which course of treatment to pursue. Therefore, determining whether a tumor is benign or malignant is a crucial part of the diagnosis stage.


Because benign tumors are not considered to be aggressive and do not usually infiltrate surrounding tissue or other sections of the body, it is not regarded as a problem and therefore is typically left alone rather than being removed. Benign tumors only become problematic if they become large enough to press on surrounding tissue and obstruct specific structures, which may result in pain or other symptoms. In this instance, a benign tumor would be removed. Malignant tumors, on the other hand, develop at an abnormally faster rate and have a higher propensity to spread to other parts of the body or metastasize. From there, doctors often perform biopsies to ascertain the tumor’s size and stage, which would indicate how aggressive the tumor is. And depending on the stage and severity they can then decide what to do next. Because malignant tumors can spread through the bloodstream or in other ways, it is critical for doctors to detect it early. For this reason, early detection of breast cancer is crucial for a better prognosis and treatment options, as well as enhancing a patient’s chances of survival. Having a reliable and accurate method to diagnose and determine whether a patient has a benign or malignant breast tumor is helpful in light of these concerns.


When interpreting scans or images to determine whether a patient’s breast tissue contains tumors, certain features are searched for in order to classify these tumors, and more particularly, whether the tumor is benign or malignant. If a patient does have a tumor, doctors can use blood testing and other procedures to identify whether the cancer is benign or malignant. Nevertheless, scanned images, particularly ultrasound images, continue to be important to the detection and diagnosis process.


While examining ultrasound images for tumors or other abnormalities, a benign and malignant tumor can be distinguished from one another based on their shape and definition from these images. A benign tumor typically has a reasonably well-defined shape, whereas a malignant tumor lacks this well-defined shape and includes more irregular lumps throughout the tumor. Typically, a physician or radiologist will evaluate these ultrasound images to manually identify the sort of tumor. Unfortunately, faulty judgment can lead to an incorrect overall diagnosis due to clinicians having varied backgrounds, experiences, and understandings. For this reason, there may be a way to enhance the diagnostic process by categorizing these ultrasound images according to the specific characteristics of each type of tumor


Given these difficulties, there has been a lot of research done to attempt improvements in tumor classification. To aid in this development of an efficient method for classifying breast cancer tumors, an image classification-type machine learning model was created. The goal was to identify whether applying non-traditional data augmentation approaches would lead to a more improved machine learning model for breast tumor image classification.

Materials & Methods

Materials

      Computer

      Jupyter Notebook

Methods

First, open up jupyter notebook and set up the environment. For the environment, install the libraries numpy, pandas, matplotlib, keras and tensorflow. With tensorflow other packages are also installed. Upload the downloaded dataset into jupyter notebook, the dataset includes 800 ultrasound images of normal, benign, and malignant breast tissue. Once the dataset is uploaded to jupyter notebook unzip the file. Using the unzipped dataset begin with preprocessing the ultrasound images. With Keras ImageDataGenerator data augmentation techniques such as rescale, shear range, zoom range, and horizontal flips can be applied. Speckle noise, blur, and contrast adjustments were also applied, to more closely mimic issues or noise that may interfere with an ultrasound image, which makes it more difficult to read. This also creates more images for the model to be trained on, the new images may be more zoomed in on a certain area, flipped, etc. Split the data into training and validation sets, 80% of the images are used for the model's training, and the other 20% are used for validating the model. From this the actual number of images across the three classes of benign, malignant, and normal are produced, 1263 images will be used for the model's training and 315 images will be used for its validation.


Next, MobileNet is chosen as the Convolution Neural Network (CNN) model to be trained and used as the model’s base layer architecture. To do this, import the libraries MobileNet, ImageDataGenerator, and Sequential which from within the library keras previously installed. Then the MobileNet model will be preprocessed. The base layers of the MobileNet architecture will be kept but will be able to be updated throughout the training process. The operation Global Average Pooling layer will also be used in the model to help extract features that are important to the images that the model is being trained on in a more simplified matter. Another thing that needs to be done is stating how many times the model should run through the dataset during training, and each time it goes through the dataset the model's algorithm learns more. For this specific dataset training, the number of times the model will run through the dataset will be 10. The model can be compiled by customizing or setting its optimizer, loss function, and metrics, as well as viewing this model's summary to check for each of the model’s layers, its architecture, and the parameters within the model.

Another factor that is considered when training and building this model is reducing the likelihood of overfitting. To check for overfitting, the class distribution for the number of benign, malignant, and normal ultrasound images is checked. With this dataset that was chosen, there are more benign images than malignant and normal images which means there could be a chance of overfitting for the model. This could disrupt its training and the accuracy being produced. To reduce the chance of overfitting the regularization technique dropout will be implemented into the model. The dropout technique is commonly used to prevent the model from simply memorizing whether an image is benign, malignant, or normal during the training phase.


A second factor that is considered for the model’s training is adding a callback, which is helpful to keep a closer look at the model during the training process every time it goes through the dataset (which was set to 10 times). The callback functions EarlyStopping and

ModelCheckpoint will be used to help with this monitoring. With the EarlyStopping function, the loss function and optimizer are being closely monitored to stop the model training if going through each iteration of the dataset does not improve the testing/validation group that was split earlier. The callback function ModelCheckpoint helps to save the model that worked the best meaning it had the highest optimization value and lowest loss function, which is also being closely observed with this function.


Results


The model's accuracy was checked after building, training, and validating the model through new data. The accuracy is composed of how well the model could classify the ultrasound images it was given over time. The accuracy is based on the base model MobileNet and the several modifications made to make the model perform in the most ideal way.


Two main features that were customized on the model were the number of epochs the training was done over as well as the learning rate. The training went to 10 epochs and was given a learning rate of 0.0001. The epoch is the number of times the model fully goes through the data and learns specific pieces of the data, in this case, the images, each time it runs through. The learning rate is a hyperparameter customized for the model that will learn from the data when reviewing it. Making adjustments to the model will increase its ability to learn the data after going through each epoch. The plots that were generated based on the model's accuracy, to help evaluate the efficiency and accuracy of this model created, demonstrate an x-axis and y-axis. The x-axis represents each epoch or iteration when the model goes through the dataset, and the y-axis (Figure 1) represents the accuracy of the model on the training set and validation set. Whereas the other y-axis (Figure 2) shows the training and validation loss, meaning how well the model is adapting to generalizing the data in the training and validation sets. The goal is to minimize the model’s loss amount as much as possible while maximizing the accuracy.


Looking at the accuracy of the model, throughout the training process, the overall ability of the model to correctly classify the images seemed to have a steady but gradual increase. The first plot (figure 1) that was generated consists of the model’s accuracy during both the training and validation over the 10 epochs. The training data seems to have started at around 0.96 and while it had a slight decrease during the first epoch, overall it did increase, ending at around 0.97 at the tenth epoch. However, while the model’s accuracy during the training was relatively high, this doesn’t necessarily mean the validation or training set will experience the same success. The model accuracy for the validation set can be seen to be somewhere between 0.83 and 0.88, which fluctuates throughout the ten epochs.


For the loss of the model, especially during the validation set, the constant change in loss value changes quite frequently throughout the ten epochs, with its range consisting of between 0.45 and 0.6. In Figure 2, it can be seen that throughout the midpoint of the epochs, the loss value was at its highest, however, as it came to the end of iterating through the model, the loss value greatly decreased. Unlike the validation loss, the training loss was much lower and consistent in both these aspects. In fact, over the ten epochs, its value slightly decreased and was always below 0.1.


In Figure 3, the overall data, accuracy, and loss of the final model built can be represented by a more distinct line graph. The points at each epoch demonstrate a more detailed picture of where and at which points specifically the model's accuracy and loss either increased or decreased, as well as by how much.


Discussion

These findings suggest various things about the model depending on the factors being considered. There could be several reasons for the discrepancy between the greater accuracy level in the training set and the 0.10 decreased difference in the validation set. Although there were several precautions taken to prevent overfitting there is still a chance that instead underfitting may have occurred, resulting in the training sets having higher accuracy than the validation. Overfitting happens when the model learns the specifications of the training data, making it difficult for the model to make larger generalizations when looking at new data through the validation set. Whereas underfitting is when the model has difficulties in picking up on the specific training and validation data. Although regularization techniques were employed to prevent overfitting and to an extent underfitting, as well as data augmentation techniques to increase the data diversity, it is still possible that these measures weren’t enough and it was still a “limited” amount of data. If resources were not as limited, finding another dataset with a similar set of classes, benign, malignant, and normal, to validate or train the model a second time would have been ideal to avoid this issue.


The findings for the loss graph imply again that there may have been an error with underfitting in the model causing a larger loss value for the validation set compared to the relatively low values seen during the training. While the validation set did have a larger loss value, it was still below 1.0 meaning that the model was still learning relatively well from the new data. Considering this, the model did a good job of learning from its mistakes and adjusting accordingly over the epochs. This is especially seen after the fifth epoch when the loss value decreases.


Future studies would first entail rebuilding and testing the model's architecture with MobileNet. As well as using a different dataset to further increase the training set diversity, in order to see if the model would have run better if it hadn’t run into underfitting because of the sets diversity. Another future study beyond just working to improve the model would be trying to apply this type of image classification on mobile apps or a way for doctors to apply these techniques in the real world as a way of assistance when reading patients' breast screening ultrasounds.


Appendix

Figure 1 Model accuracy showing accuracy over epoch for validation and training set, Credit: Author.

 





 

Figure 2 Model loss showing loss value over epoch for validation and training sets, Credit: Author.



Figure 3 Direct comparison dot plot of training and validation loss and accuracy, Credit:

Author.

References

1. Akram, M., Iqbal, M., Daniyal, M., & Khan, A. U. (2017). Awareness and current knowledge of breast cancer. Biological Research, 50(1). https://doi.org/10.1186/s40659-017-0140-9


2. Bhushan, A., Gonsalves, A., & Menon, J. U. (2021). Current State of Breast Cancer Diagnosis,

Treatment, and Theranostics. Pharmaceutics, 13(5), 723.

https://doi.org/10.3390/pharmaceutics13050723

3. Brady, A. P. (2016). Error and discrepancy in radiology: inevitable or avoidable? Insights into

Imaging, 8(1), 171–182. https://doi.org/10.1007/s13244-016-0534-1

4. Ibrahim, A., Mohammed, S., & Ali, H. A. (2018). Breast Cancer Detection and Classification Using Thermography: A Review. The International Conference on Advanced Machine

Learning Technologies and Applications (AMLTA2018), 496–505.

https://doi.org/10.1007/978-3-319-74690-6_49

5. Institute of Electrical and Electronics Engineers. (2019, September 5). BottleNet: A Deep

Learning Architecture for Intelligent Mobile Cloud Computing Services | IEEE Conference Publication | IEEE Xplore. Retrieved from ieeexplore.ieee.org website:

https://ieeexplore.ieee.org/abstract/document/8824955

6. Kolb, T. M., Lichy, J., & Newhouse, J. H. (2002). Comparison of the performance of screening mammography, physical examination, and breast US and evaluation of factors that influence them: an analysis of 27,825 patient evaluations. Radiology, 225(1), 165–175.

https://doi.org/10.1148/radiol.2251011667

7. Łukasiewicz, S., Czeczelewski, M., Forma, A., Baj, J., Sitarz, R., & Stanislawek, A. (2021).

Breast cancer—epidemiology, Risk factors, classification, Prognostic markers, and

Current Treatment Strategies—an Updated Review. Cancers, 13(17), 4287.

https://doi.org/10.3390/cancers13174287

8. Nasser, M., & Yusof, U. K. (2023). Deep Learning Based Methods for Breast Cancer Diagnosis: A Systematic Review and Future Direction. Diagnostics (Basel, Switzerland), 13(1), 161.

https://doi.org/10.3390/diagnostics13010161

9. Sun, Y.-S., Zhao, Z., Yang, Z.-N., Xu, F., Lu, H.-J., Zhu, Z.-Y., … Zhu, H.-P. (2017). Risk

Factors and Preventions of Breast Cancer. International Journal of Biological Sciences,

13(11), 1387–1397. https://doi.org/10.7150/ijbs.21635

Comments

Popular posts from this blog

Human Emotion of Fear; The Psychology of Phobias and The Little Albert Experiment

CRISPR-Cas9: Current Status and Applications - Literature Review