This repository contains an implementation of the K-Nearest Neighbors (K-NN) algorithm for classifying users based on their age and estimated salary. The dataset used is the "Social Network Ads" dataset.
The K-NN algorithm is a simple, non-parametric classification algorithm that works by finding the majority class among a query point's nearest neighbors. In this project, we:
- Load and preprocess the dataset
- Train a K-NN model
- Evaluate the model using a confusion matrix
- Visualize decision boundaries for both the training and test datasets
Ensure you have the following libraries installed:
```bash
pip install numpy pandas matplotlib scikit-learn
git clone https:/EbadShabbir/github.com//knn-classification.git
cd knn-classification