Implementation of the Perceptron classifier using Pygame to display the learning and classification process.
This code was created following the videos from the Coding Train channel.
Instructions needed to run the project.
This code requires Python3 and Pygame to run.
Install pygame by running the following:
pip install -r requirements.txt
To run the game, call:
python main.py
Inside main.py we have:
-
WIDTH: window width
-
HEIGHT: window height
-
FPS: frames per second
-
POINT_SIZE: size of the points
-
NUM_POINTS: size of the dataset
-
LEARNING_RATE: learning rate
Also, during the execution the user can interact with the classifier with:
- LEFT MOUSE BUTTON: add new point at the cursor's position.
- RIGHT MOUSE BUTTON: generate new dataset with different line equation.