📊 K-Nearest Neighbors (KNN) Classifier
A Python-based implementation of the K-Nearest Neighbors (KNN) algorithm for classification tasks.
📖 Overview
This project implements a K-Nearest Neighbors (KNN) classification algorithm in Python.
KNN is a supervised learning technique used for classification and regression.
Using datasets like Iris or custom CSV files, this tool predicts the class of a data point based on the majority vote of its k nearest neighbors.
🎯 Objective
To build a simple yet powerful KNN classifier that can:
- 🏃♂️ Process user-supplied datasets.
- 🔥 Classify new data points with high accuracy.
- 📊 Visualize classification results.
✨ Features
| 🚀 Feature | 🔥 Description |
|---|---|
| 📦 Cross-Platform | Runs on Windows, Linux, and macOS |
| 🖥️ Interactive Notebook | Implemented in Jupyter Notebook (.ipynb) |
| 📊 Data Visualization | Includes plots of decision boundaries |
| 📁 Custom Dataset Support | Accepts user-provided CSV files |
| ⚡ Parameter Tuning | Adjustable k value for experimentation |
🔍 Dataset Details
- Default Dataset: Iris Dataset (150 samples, 3 classes)
- Features: Sepal length, Sepal width, Petal length, Petal width
- Classes: Setosa, Versicolor, Virginica
- Custom Support: Any CSV file with numeric features
🔮 Future Scope
- 🌐 Web Deployment: Flask/Django integration for web apps
- 📱 Mobile App: TensorFlow Lite for Android/iOS
- 🧠 Advanced Models: Add SVM, Random Forest for comparison
- ☁️ Cloud API: REST API for third-party applications
🛠️ Technology Stack
| Component | Technology |
|---|---|
| Programming Language | Python 3.11+ |
| Machine Learning | scikit-learn |
| Visualization | Matplotlib, Seaborn |
| Notebook Environment | Jupyter Notebook |
📥 Installation
🐍 Prerequisites
- Python 3.11+
- pip (Python package manager)
- Jupyter Notebook
📚 References
Built With
- jupyter-notebook
Log in or sign up for Devpost to join the conversation.