Skip to content

bstunney/KNN-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I created this KNN algorithm visualization project during December 2022 for my programming in C++ Final Project.

Once SFML graphics is downloaded, program can be ran in the command line.

To compile: g++ -std=c++17 -g ./src/*.cpp -o prog -I./include -lsfml-graphics -lsfml-window -lsfml-system -lpthread (dependant on SFML download process)

To run: ./prog 25 (parameter specifies number of K-neighbors to visualize)

This program visualizes the K-Nearest Neighbors Classification process. After clicking anywhere on the screen, a random test point will be displayed in red and the K nearest points will be displayed in red or green depending on their category. KNN then takes the majority vote of those K-Nearest Neighbors and will predict it as such. The visualization uses the popup to display that prediction accordingly.

required downloads: SFML graphics

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages