Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Breast Cancer Classification using Feature Engineering & Model Comparison πŸ“Œ Overview

This project focuses on building an accurate and interpretable classification model for breast cancer diagnosis using the Breast Cancer Wisconsin dataset. The goal is not only high performance but also understanding the underlying data structure and feature importance.

🎯 Objectives Perform in-depth Exploratory Data Analysis (EDA) Identify key predictive features Apply feature engineering to reduce dimensionality Compare multiple machine learning models Build a simple, interpretable, high-performing model πŸ” Exploratory Data Analysis (EDA) Key Findings: Dataset shows moderate class imbalance (~63% Benign, ~37% Malignant) Strong separation observed in: Size features β†’ radius, perimeter, area Shape features β†’ concavity, concave points, compactness Weak separation in: texture, symmetry, fractal dimension Multicollinearity: High correlation among: radius β‰ˆ perimeter β‰ˆ area Feature grouping identified: Size cluster Shape cluster βš™οΈ Feature Engineering

To reduce redundancy and improve interpretability:

size_score Captures tumor size shape_score Captures structural irregularity Insight:

A 2-feature representation preserves most of the predictive power.

πŸ€– Models Used Logistic Regression Linear Discriminant Analysis (LDA) Quadratic Discriminant Analysis (QDA) K-Nearest Neighbors (KNN) πŸ“Š Model Performance Model Accuracy Malignant Recall Key Observation Logistic Regression 99% 0.98 Best overall KNN 95% 0.86 Sensitive to local overlap QDA 93% 0.83 Unnecessary flexibility LDA 90% 0.74 Strong assumptions fail 🧠 Key Insights Dataset is highly separable Size is the dominant feature Shape adds refinement Texture-based features add noise Simple models outperform complex ones πŸ”¬ Final Model

Using only:

['size_score', 'shape_score']

Achieved:

99% accuracy Only 1 misclassification Coefficient Insight: Size has significantly higher impact than shape Confirms EDA findings πŸ“ˆ Decision Boundary Clear linear separation Minimal overlap between classes Confirms suitability of linear models ⚠️ Important Consideration False negatives (missed malignant cases) are critical Model evaluation focused beyond accuracy: Recall F1-score πŸš€ Conclusion

The project demonstrates that breast cancer classification can be effectively solved using a low-dimensional, interpretable feature space. Tumor size and shape alone capture the majority of the predictive signal, making Logistic Regression the optimal choice.

πŸ’‘ Key Takeaway

Simplicity beats complexity when the data is inherently structured.

πŸ“‚ Tech Stack Python Pandas, NumPy Matplotlib, Seaborn Scikit-learn πŸ“Œ Future Improvements Cross-validation & robustness checks Threshold tuning for medical sensitivity ROC-AUC optimization Deployment-ready pipeline πŸ‘€ Author

https://www.linkedin.com/in/shorya-bisht-a20144349/

About

Breast cancer classification project using EDA, feature engineering, and model comparison. Reduced data to size and shape features, achieving 99% accuracy with Logistic Regression. Demonstrates strong linear separability and importance of simple, interpretable models.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages