In this repo , we try to reproduce some of the results reported in section 5 of the Freund and Schapire 1999 article (in particular the graphs for d = 1 and d = 2 in Figure 2).
URL | Title |
---|---|
10.1023/A:1007662407062 | Large Margin Classification Using the Perceptron Algorithm |
There are two method to run this project: the preferred method is to run the colab notebook.
Instructions below will get you a copy of the project up and running on your local machine.
What things you need to install the software and how to install them
You will need a Python3 env here i will list the instruction for the Anaconda distribution
Navigate in the Anaconda Prompt and select your environment for example:
conda activate pyenv
To download the repository:
git clone https://github.com/Filmon97/voted-perceptron.git
Then you need to install the basic dependencies to run the project on your system:
pip install -r requirements.txt
To get the pretrained models you will need to fetch the data from the submodule:
cd voted-perceptron
git submodule init
git submodule update
Now you need to create a 'model' folder and then copy in it the content of the 'pretrained' folder.
If you don't wont to use the pretrained models, don't copy the folder and then change the train variable in the main.py to true (Warning: Computationally Heavy)
- Numpy - NumPy is the fundamental package for scientific computing with Python.
- Numba - Numba makes Python code fast.
- Joblib - Easy simple parallel computing.
- I would like to thank Fred Foo for suggesting how to compute the Gram Matrix that i used for the Google Colab and dough for explaining me about Scipy dot method.