Skip to content

filmon-arefayne/voted-perceptron

Repository files navigation

voted-perceptron

Open In Colab

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).

Paper implemented

URL Title
10.1023/A:1007662407062 Large Margin Classification Using the Perceptron Algorithm

Getting Started

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.

Prerequisites(Local)

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

Installation Guide

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)

Built With

  • Numpy - NumPy is the fundamental package for scientific computing with Python.
  • Numba - Numba makes Python code fast.
  • Joblib - Easy simple parallel computing.

Acknowledgments

  • 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.