Performed Principal Component Analysis (PCA) on a cancer dataset to reduce dimensionality, identify key features, and visualize the separation between benign and malignant samples using Python and scikit-learn.
Apply PCA for dimensionality reduction. Identify principal components capturing the most variance. Visualize the dataset in 2D for clear class separation. Interpret which features influence the diagnosis outcome.
Based on the Breast Cancer Wisconsin Dataset from scikit-learn. Each record contains cell nucleus measurements with a binary diagnosis variable: 0 → Benign 1 → Malignant
Data Preprocessing – Cleaned and encoded the dataset. Feature Scaling – Standardized data using StandardScaler. PCA Transformation – Computed top components and explained variance. Visualization – Generated 2D PCA scatter plots and variance contribution charts. Results The top two components captured over 90% of total variance. PCA visualization demonstrated clear separation between benign and malignant samples. Identified which features contribute most to diagnostic variance.
Developed by Gresa Hisa — AI & Cybersecurity Engineer