7 minute read

USING MACHINE LEARNING TO DIAGNOSE BREAST CANCER

Rana Mohamed Babikir

In 2022 alone, breast cancer led to 670000 deaths worldwide1, making it one of the leading causes of cancer-related deaths among women. While there have been significant advancements in breast cancer diagnosis, research and treatment, the global disease burden remains tragic.

A key factor in increasing survival rates is early detection. Through it, patients can have more treatment options and positive treatment outcomes. According to Cancer Research UK, almost 100% of breast cancer patients who were diagnosed at Stage 1 survived for 5 years or more after diagnosis, but for Stage 4, this figure drops to just over 25% of women2.

This isn’t only about the numbers.

Through early detection, patients have more time to receive guidance and information, make important decisions, and sort out financial matters. In other words, this is an important public health strategy.

A great approach to it is to raise awareness among the general public about the importance of breast self-exams, clinical exams, and getting annual mammograms (X-ray images of the breast) for older women. Another way to maximise the benefits of early detection is to increase the speed and accuracy of cancer screening.

This is where machine learning-based solutions come into play.

Machine Learning (ML)

While incorrectly used interchangeably with AI, machine learning is a subset of AI where machines have the ability to learn automatically without explicit instructions, analyse patterns in data, and improve from experience. ML is particularly useful in uncovering patterns and trends in a complex dataset that humans may not spot, and then drawing insights from it. It is therefore used to detect and diagnose diseases. In supervised learning, a common type of ML, the machine is trained using a labelled dataset with inputs and correct outputs. It learns the relationship between both and uses it to predict outputs, creating a predictive data model.

Think of it this way: based on past experience, you know that the more effort you put into an assignment, the higher your grade will likely be. As a result, you can have a pretty good idea of the grade you should be getting based on your effort. Supervised learning can be used for classification problems, where the input data is classified into a predicted class label, such as when e-mails are grouped as “spam” and “non-spam”. Disease diagnosis is a classification problem since a screening will only give two possible outcomes: yes, the patient has the disease, or no, they don’t.

Mammography is one of the most effective breast cancer screening methods since it can detect the disease up to three years before a noticeable lump can be felt. Radiologists examine mammography images to diagnose breast cancer, yet they miss 10% to 30% of cancers3, often because tumours go unnoticed or are falsely deemed benign. Various studies have used machine learning models to classify benign and malignant tumours from a breast image, which could potentially make them act as a second opinion for radiologists and reduce diagnosis errors.

Figure 1 shows the steps involved in a binary classification of a tumour as either benign or malignant.

A mammogram image is inputted and processed. Next, the image is separated into homogenous regions; the pectoral muscles are removed from the image, and regions of interest and abnormal mass are identified for increased classification accuracy.

For a given mass on a mammogram, we measure certain features and use them for classification. An accurate way is a boundary evaluation. This is because a benign tumour has a round, smooth, and well-defined boundary. On the contrary, a malignant tumour has a rough, blurry, and indistinct boundary (see Figure 2).

We can classify a mass as being benign or malignant by looking at its boundary pixels and the texture of its surrounding region.

The classifier uses the selected features to classify a tumour as malignant or benign. K-nearest Neighbours (KNN), Decision Trees, and Support Vector Machines (SVM) are the most common supervised learning models used as classifiers.

K-nearest Neighbours (KNN)

KNN is one of the simplest classification algorithms. The goal is to use the features of neighbouring data points to classify a new data point into a class:

1. The algorithm calculates the distance between the new data point and other, classified data points in the set.

2. It sorts the distances in ascending order.

3. The new data point is classified into the most commonly occurring class within its k nearest neighbors. The k value is decided to find a balance between overfitting and under-fitting. In this example, if k=5, we look at the first 5 distances and assign the new data point to the most common class.

We can therefore classify our new data point into class: pink squares.

A study in the Asian Journal of Research in Computer Science applied a weighted KNN algorithm to a dataset comprising 699 mammogram images and compared its accuracy to 4 other classifiers. The algorithm yielded the highest accuracy of 96.7% among all the tested classifiers5.

Decision Tree

Unsurprisingly, the structure of a decision tree diagram looks like an inverted tree; it’s fairly easy to understand. We start with a root node, representing a feature (predictor variable), with two “branches” attached to lead to a decision node. The decision node splits into sub-nodes. If a decision node does not have more branches, it is called a leaf/terminal node; it represents the final outcome (response variable). Figure 5 shows how a decision tree algorithm can be used for breast cancer diagnosis, with leaf nodes being “benign” or “malignant”:

Support Vector Machines (SVM)

With SVM, the goal is to find a suitable hyperplane (a line) that divides the dataset into two classes. The further away the data points are from the hyperplane, the more likely it is that they have been classified correctly.

The margin is the distance between the hyperplane and the nearest data point from each class, so essentially, the larger the margin of our chosen hyperplane, the better. When a new data point is added, its class is decided by looking at which side of the hyperplane it lies on (see Figure 6).

If there is no clear hyperplane or the data set is linearly non-separable, the kernel function is used, putting the data in a 3D view rather than a 2D one. It’s easier to find a hyperplane now.

Conclusion

The high accuracies observed in the above algorithms can potentially increase the rate of early detection, resulting in better outcomes for patients. There are more supervised learning models, and even neural networks, that can be used to diagnose breast cancer. With machine learning, the possibilities are truly endless. While we haven’t reached a stage where we are fully reliant on AI for matters concerning human health, we’ve definitely reached one where we don’t mind having a second opinion by our side.

Bibliography

1. World Health Organization. Breast cancer. World Health Organization. Published 2024. https://www.who.int/news-room/fact-sheets/detail/breast-cancer

2. Cancer Research UK. Survival for breast cancer | Breast Cancer | Cancer Research UK. www.cancerresearchuk.org. Published January 3, 2020. https://www.cancerresearchuk.org/aboutcancer/breast-cancer/survival

3. Ekpo EU, Alakhras M, Brennan P. Errors in Mammography Cannot be Solved Through Technology Alone. Asian Pacific Journal of Cancer Prevention: APJCP. 2018; 19(2):291-301. doi: https://doi.org/10.22034/APJCP.2018.19.2.291

4. Li H, Zhuang S, Li D, Zhao J, Ma Y. Benign and malignant classification of mammogram images based on deep learning. Biomedical Signal Processing and Control. 2019;51:347-354. doi: https://doi.org/10.1016/j.bspc.2019.02.017

5. Khorshid SF, Abdulazeez AM, Sallow AB. A Comparative Analysis and Predicting for Breast Cancer Detection Based on Data Mining Models. Asian Journal of Research in Computer Science. 2021;8(4):45-59. doi: https://doi.org/10.9734/ajrcos/2021/v8i430209

6. Yadav P, Varshney R, Kumar Gupta V. Diagnosis of Breast Cancer Using Decision Tree Models and SVM.; 2018. Accessed September 30, 2024. https://www.irjet.net/archives/V5/i3/IRJETV5I3654.pdf

This article is from: