Skip to content
/ ML_KNN Public

K Nearest Neighbors Classifier in C++ implemented from scratch.

Notifications You must be signed in to change notification settings

ram-nad/ML_KNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML_KNN


Implementation of K Nearest Neighbors Classifier in C++.

Implemented Two Feature Scaling:

  • MinMaxScaler
  • Standard Scaler

Also added a function that measures accuracy in terms of correct predictions as percentage of total predictions.

Supports 3 Distance Metrics:

  1. Euclidean
  2. Manhattan
  3. Chebyshev

Also included a header containg IRIS Flower Data Set.

Added test.cpp: Tests the KNN using IRIS Data Set.

To run cd into directory,

g++ -c knn.cpp

g++ -c test.cpp

g++ -o knntest test.o knn.o

./knntest

About

K Nearest Neighbors Classifier in C++ implemented from scratch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published