Skip to content

Implementation of a perceptron algorithm that trains a binary classifier to classify points inside and outside an ellipse

License

Notifications You must be signed in to change notification settings

definability/perceptron_ellipse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perceptron Ellipse

Implementation of a perceptron algorithm that trains a binary classifier to classify points inside and outside an ellipse using Python + NumPy, Numba, Matplotlib, and SciPy.

Check out the following Medium stories to know more about this project:

Installation

You need Python 3.12 and pipenv. Then, create a virtual environment and install the needed dependencies:

pipenv shell
pipenv install

Alternatively, you can use venv or any other virtual environment tool and install the following packages:

Usage

Run the script __main__.py:

python .

You should see a GUI that allows you to add your own points and train the classifier. Controls:

  • Left-click to add a point inside the ellipse;
  • Right-click to add a point outside the ellipse;
  • Enter the number of training iterations and click "Train" to train the classifier with a custom number of iterations.

Also, Matplotlib provides a toolbar with position and zoom controls.

Perceptron Ellipse

About

Implementation of a perceptron algorithm that trains a binary classifier to classify points inside and outside an ellipse

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages