Breast Cancer Classification

Breast Cancer:

Breast cancer is a disease in which cells in the breast grow out of control. There are different kinds of breast cancer. The kind of breast cancer depends on which cells in the breast turn into cancer.

credit: VeryWell / Joshua Seong

Deep Learning:

Using brain simulations, hope to:

– Make learning algorithms much better and easier to use.

– Make revolutionary advances in machine learning and AI.

I believe this is our best shot at progress towards real AI

Google Colab:

According to the google research website, Colaboratory, or “Colab” for short, is a product from Google Research. Colab allows anybody to write and execute arbitrary python code through the browser, and is especially well suited to machine learning, data analysis and education. More technically, Colab is a hosted Jupyter notebook service that requires no setup to use, while providing free access to computing resources including GPUs.

The Complete Code for Breast Cancer detection using Deep Learning along with dataset used in this blog is available at : Github Link

Detail Discription of Code for Classification :

image 1 : Google Colab

2. Upload the Dataset in Google Drive of the same directory :

image 2: Google Drive

3. To access the files in the google drive you need to autenticate it . Run this code in image 3 to Authenticate Colab to use the files in Google Drive.

image 3

After running the code a link will be generated. Click the link , allow colab to use the file in selected drive. After Allowing , token will be generated, fill the text box below the link and hit enter.

4. Locate the folder that contain the dataset as in image 4:

image 4

5. Import the necessary libraray:

image 5

6. Run the code as show in image 6 in your colab notebook to read the dataset and show it.

image 6

7. The feature and Label are generate from the dataframe using the code in image 7.

image 7

8. The Categorical data in the y is encoded using LabelEncoder from sklearn libarary as shown in image 8.

image 8

9. Dataset is Splitted into the Training set and Test set using the train_test_split function of sklearn into the ration of 80:20.

image 9

10. Feature Scaling is a technique to standardize the independent features present in the data in a fixed range. The scaling of the feature is carries out using the StandardScaler function in Sklearn library. As shown in image 10.

image 10

11. The shape of the label array and feature array while training are in image 11.

image 11

12. Creating a Deep Learning Model to train on the feature and label dataset to learn and classify breast cancer.

image 12

13. Implemented a neural Network solution and improved the acurracy of breast cancer classification to the greeks-for-greeks article which has an test accuracy of 96.51%.

14. The Deep Learning Model was implemented on Test Dataset , the accuracy obtained was of 98.24 %.

Thus succesfully classsified the breast cancer as Malignant and benign using the kaggle dataset with an accuracy of 98.24%.

The Complete Code for Breast Cancer detection using Deep Learning is available at :Github Link

Thank You for your time.

Student Researcher | NLP | CV | DL | Python