A Knn algorithm built in Python using the numpy library for the algorithm and the Pygame library for the GUI. Once you press "Dessiner", the white points will become red or blue depending of there closest neighboor.
- Required libraries
pip install numpy
pip install numpy
pip install matplotlib
- Modifying the launch parameters
Rendez-vous dans
conf.ini
points_rouges
: The number of red pointspoints_bleus
: The number of blue pointspoints_blancs
: The number of white points (which will be red or blue once you press "Dessiner")w_x
: The width of the windoww_y
: The height of the window