- Implement the PLA learning algorithm (using Python) and analyze its performance using different training sets
- DataEmit.py : Generate the training data
- PLA.py : Output the learned weight and plot graph using PLA Algorithm
Make sure you have installed all of the following prerequisites on your development machine:
- Python - Download & Install Python. Version: Python 2.7.15 (default, Jan 12 2019, 21:07:57)
- Git(Optional) - Download & Install Git. MacOSX and Linux machines typically have this already installed.
- Runtime Environment - Terminal in MacOSX
$ git clone https://github.com/alexsbc303/PLA-Learning-Algorithm.git
Run DataEmit.py
$ cd PLA-Learning-Algorithm
$ python DataEmit.py [5,2,3] 10 10
Run PLA.py (after generating data by DataEmit.py)
$ cd PLA-Learning-Algorithm
$ python PLA.py train.txt
- X-axis - x1
- Y-axis - x2
- Black line - Random generated line
- Purple line - Final PLA line