Case Study

Breast Cancer Prediction Engine

ML Diagnostic Classification System

An end-to-end machine learning diagnostic pipeline and Streamlit web application that classifies breast tumors as benign or malignant with 98.25% accuracy using 5 ML algorithms.

PythonScikit-LearnStreamlitPandasPCASeabornJupyter
98.25%Diagnostic Accuracy
0.9954ROC-AUC Score
5Models Benchmarked
569Clinical Samples

System Architecture

Clinical FNA Features (30 metrics) -> StandardScaler -> Dimensionality Reduction (PCA) -> 5 Classifier Models -> Confusion Matrix & ROC Evaluation -> Streamlit App Inference

Screenshots

Breast Cancer Prediction Engine screenshot 1
Breast Cancer Prediction Engine screenshot 2
Breast Cancer Prediction Engine screenshot 3
Breast Cancer Prediction Engine screenshot 4
Breast Cancer Prediction Engine screenshot 5
Breast Cancer Prediction Engine screenshot 6
01

Problem

Breast cancer is one of the leading causes of cancer mortality worldwide. Traditional diagnostic methods depend on visual cell inspection, which can carry subjective error rates up to 20%. Medical professionals require robust computer-aided diagnostic (CAD) systems to boost diagnostic precision and minimize missed malignant cases.

02

Dataset & Preprocessing

Utilized the UCI Breast Cancer Wisconsin (Diagnostic) Dataset containing 569 samples with 30 nuclear feature characteristics (radius, texture, concavity, fractal dimension). Preprocessed data using StandardScaler normalization and stratified 80/20 train/test splitting to preserve class balance.

03

Dimensionality Reduction & Feature Selection

Engineered 2D PCA (Principal Component Analysis) projections to map 30 dimensions down to 2 principal components while preserving maximum variance. Performed feature importance analysis using Random Forest tree ensembles to isolate key diagnostic markers such as worst concave points, worst perimeter, and worst radius.

04

Multi-Model Evaluation & Cross-Validation

Trained and benchmarked 5 machine learning models: Logistic Regression, Support Vector Machine (SVM), Random Forest, K-Nearest Neighbors (KNN), and Gradient Boosting. Evaluated models across Accuracy, Precision, Recall, F1-Score, ROC-AUC curves, Precision-Recall curves, and 5-fold Stratified Cross-Validation.

05

Streamlit App & Diagnostic Impact

Achieved top-tier performance with 98.25% test accuracy and 0.9954 AUC (Logistic Regression & SVM) with only 1 false positive and 1 false negative. Built an interactive Streamlit inference app allowing clinicians to adjust patient tumor measurements in real time and receive instant diagnostic probability scores.

Interested in this project?

Let's discuss the engineering decisions and system design.