This project demonstrates the implementation of the K Nearest Neighbors (KNN) and K-means algorithms from scratch in C++. It was developed as part of the second-semester coursework for the Object-Oriented Programming subject. This was made to have a lower-level understanding of how these machine learning algorithms work and to appreciate how elegantly pandas handles data and how much we should appreciate the library. This is a pandas appreciation repository :D
- Implementation of the K Nearest Neighbors algorithm
- Implementation of the K-means clustering algorithm
- Support for custom distance metrics in KNN
- Ability to specify the number of clusters in K-means
- Interactive command-line interface for user interaction
- Efficient data structures and algorithms for optimal performance
To use this project, follow these steps:
- Clone the repository:
git clone https://github.com/ahmedHanzala/knn-kmeans-mnist-cpp-implementation.git - Compile the source code using a C++ compiler
- Run the executable file
- Follow the on-screen instructions to interact with the KNN and K-means algorithms