/breast_cancer

Simple K Nearest Neighbors Classification using sklearn Dataset

Primary LanguageJupyter Notebook

Breast Cancer Classification using K-Nearest Neighbors

Project Brief

Objective: In this project, I'll employ K-Nearest Neighbors (KNN) to classify breast cancer cases. I'll classify breast cancer cases using KNN, optimize model parameters, perform dimensionality reduction with PCA, and visualize clusters in a 2D space.

Data source: Breast cancer data from sklearn.datasets

Tasks Overview

Here's a breakdown of the tasks I'll be performing using Python:

  1. Data Load & Inspection: I'll load and inspect the breast cancer dataset, exploring feature names and creating a label table.

  2. K Nearest Neighbors (KNN) Classification: I'll train a KNN classifier with different k values, identify the optimal k, and visualize accuracy vs. k.

  3. Principal Component Analysis (PCA): I'll reduce dimensionality using PCA, determining the optimal components through cumulative explained variance and cross-validation.

  4. KNN Clustering Visualization: I'll create a 2D visualization combined with a confidence map using PCA and KNN clustering, highlighting cluster labels.