Skip to content

Repository files navigation

🎗️ Breast Cancer Diagnosis Classification

Overview

This project focuses on the classification of breast cancer tumors as Benign (B) or Malignant (M) using Machine Learning techniques.

The study explores the Diagnostic Breast Cancer Dataset and applies data preprocessing, feature reduction using Principal Component Analysis (PCA), and supervised learning algorithms to evaluate diagnostic performance.

The primary objective is to compare classification models before and after feature reduction and analyze the impact of dimensionality reduction on predictive accuracy.


Dataset

The project utilizes the Diagnostic Breast Cancer Dataset available on Kaggle.

Dataset Characteristics

  • Binary Classification Problem

  • Target Classes:

    • Benign (B)
    • Malignant (M)
  • Clinical diagnostic features extracted from digitized images of breast mass cell nuclei

  • Numerical features describing morphology, texture, radius, perimeter, area, smoothness, and other characteristics

Dataset Source

https://www.kaggle.com/datasets/ahmeduzaki/diagnostic-breast-cancer-dataset


Project Objectives

  • Explore and visualize the dataset
  • Normalize diagnostic features
  • Apply Principal Component Analysis (PCA)
  • Train and evaluate Support Vector Machine (SVM) models
  • Train and evaluate K-Nearest Neighbors (K-NN) models
  • Compare classification performance before and after feature reduction
  • Assess the effectiveness of dimensionality reduction in medical diagnosis tasks

Methodology

1. Data Exploration

  • Dataset inspection
  • Feature analysis
  • Scatter plot visualization
  • Class distribution analysis

2. Data Preparation

  • Feature-label separation
  • Data normalization using StandardScaler
  • Training and testing split (80%-20%)

3. Principal Component Analysis (PCA)

  • Dimensionality reduction
  • Scree plot generation
  • Visualization using the first two principal components
  • Selection of optimal number of components

4. Classification Models

Support Vector Machine (SVM)

  • Linear Kernel

  • RBF Kernel

  • Hyperparameter tuning for:

    • C
    • Gamma

K-Nearest Neighbors (K-NN)

  • Multiple K values tested
  • Performance comparison
  • Optimal K selection

Evaluation Metrics

Model performance was evaluated using:

  • Accuracy
  • Precision
  • Recall
  • F1-Score
  • Confusion Matrix

Results

The project compares model performance:

  • Before PCA feature reduction
  • After PCA feature reduction

The analysis highlights the effect of dimensionality reduction on classification accuracy, computational efficiency, and model generalization.


Technologies Used

  • Python
  • Jupyter Notebook
  • NumPy
  • Pandas
  • Matplotlib
  • Seaborn
  • Scikit-Learn

Project Structure

Breast-Cancer-Diagnosis-Classification/
│
├── dataset/
├── notebooks/
├── figures/
├── results/
├── Breast_Cancer_Classification.ipynb
├── Report.pdf
└── README.md

Key Learning Outcomes

  • Data preprocessing and normalization
  • Principal Component Analysis (PCA)
  • Support Vector Machines (SVM)
  • K-Nearest Neighbors (K-NN)
  • Hyperparameter tuning
  • Model evaluation and comparison
  • Medical data classification

About

Machine Learning project for breast cancer diagnosis using PCA, Support Vector Machines (SVM), and K-Nearest Neighbors (K-NN). Includes data exploration, feature reduction, model evaluation, and performance comparison.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages