Breast Cancer Tumor Classification with ANN

Syed

Syed Ashar

This project builds an Artificial Neural Network (ANN) model to classify breast cancer tumors as benign or malignant using the Wisconsin Breast Cancer Dataset.
The aim is to demonstrate how deep learning can support early and accurate diagnosis in medical applications.

๐Ÿ” Dataset

The dataset contains 30 numerical features derived from digitized images of breast mass samples.
Target variable: diagnosis
M = Malignant
B = Benign

๐Ÿ’ป Technologies Used

Python 3.x
Keras (TensorFlow backend)
Pandas, NumPy
Seaborn, Matplotlib
Scikit-learn

๐Ÿง  Model Architecture

Input Layer: 30 neurons (1 per feature)
Hidden Layers:
Dense (16 units) + ReLU + Dropout
Dense (16 units) + ReLU + Dropout
Output Layer:
Dense (1 unit) + Sigmoid (for binary classification)
from keras.models import Sequential
from keras.layers import Dense, Dropout, Input

model = Sequential()
model.add(Input(shape=(30,)))
model.add(Dense(16, activation='relu', kernel_initializer='uniform'))
model.add(Dropout(0.1))
model.add(Dense(16, activation='relu', kernel_initializer='uniform'))
model.add(Dropout(0.1))
model.add(Dense(1, activation='sigmoid', kernel_initializer='uniform'))

๐Ÿงช Evaluation Metrics

Accuracy
Confusion Matrix
Precision / Recall (optional)
Sample Confusion Matrix Result:
[[65  2]
[ 3 44]]

True Negatives: 65
True Positives: 44
False Positives: 2
False Negatives: 3

๐Ÿ“Š How to Run

Clone the repository:
git clone https://github.com/your-username/breast-cancer-ann.git
cd breast-cancer-ann

Install dependencies:
pip install -r requirements.txt

Run the notebook:
Open Classification_ANN.ipynb in Jupyter or Google Colab

๐Ÿ“‚ File Structure

โ”œโ”€โ”€ data.csv                  # Dataset file
โ”œโ”€โ”€ Classification_ANN.ipynb # Main notebook
โ”œโ”€โ”€ README.md # This file
โ”œโ”€โ”€ download.png # Confusion matrix image
โ””โ”€โ”€ requirements.txt # (Optional) Python dependencies

โœ… Key Learnings

Applied neural networks to a real-world medical dataset
Understood the importance of reducing false negatives in healthcare
Gained experience with dropout regularization and evaluation metrics

๐Ÿ“ฌ Contact

For feedback or collaboration, feel free to reach out via LinkedIn or GitHub.
Like this project

Posted Aug 6, 2025

Built an ANN model to classify breast cancer tumors using the Wisconsin Breast Cancer Dataset.