A Python implementation of the K-Nearest Neighbors (KNN) algorithm for classification and regression tasks, including sample datasets and usage instructions Description This repository contains a Python implementation of the K-Nearest Neighbors (KNN) algorithm, a simple and effective machine learning method for classification and regression. The program includes customizable parameters and sample datasets for easy testing.
Features KNN Algorithm:
Supports classification and regression tasks. Allows tuning of parameters like the number of neighbors (k) and distance metrics. Dataset Support:
Includes options to use built-in datasets or load custom datasets. Provides functionality to split data into training and testing sets. Performance Metrics:
Outputs accuracy for classification tasks. Calculates mean squared error for regression tasks.