Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MachineLearning1_Assignment3

K-Nearest Neighbors (KNN) Classification

This repository contains a MATLAB implementation of the K-Nearest Neighbors (KNN) algorithm for supervised classification.

Project Overview

The objective of the project is to implement and evaluate a KNN classifier by assigning class labels based on the nearest training samples in the feature space using the Euclidean distance metric.

Features

  • Data loading and preprocessing
  • KNN classifier implementation
  • Euclidean distance computation
  • Prediction based on majority voting
  • Hyperparameter analysis (number of neighbors, k)
  • Performance evaluation using confusion matrices
  • Classification accuracy assessment

Methodology

The implemented workflow consists of:

  1. Loading and preprocessing the dataset.
  2. Splitting the data into training and test sets.
  3. Computing Euclidean distances between samples.
  4. Selecting the k nearest neighbors.
  5. Assigning class labels through majority voting.
  6. Evaluating classifier performance using confusion matrices and accuracy metrics.

Objective

The project aims to study instance-based learning techniques and evaluate the effectiveness of the KNN algorithm for classification problems, analyzing the impact of the number of neighbors on model performance.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages