Skip to content

mrgloom/Pegasos-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README
-----------------------

This is an implementation of the Pegasos Algorithm described here:
http://www.cs.huji.ac.il/~shais/papers/ShalevSiSrCo10.pdf

In this folder there are sample training and testing files which were generated by text from the reuters dataset. The training set is called "training" and the testing set is called "testing". They are rather small, only 100 vectors per dataset, however classification is still quite good. I tested the accuracy of the results by comparing with libsvm. All you need to do, is type: "python pegasos.py" in the terminal and it will start the algorithm. If you are using very large datasets, you want to save the gram matrix, as well as the generated support vectors, rather than go through the costly operation of recomputing them, so I have set options to save this information. When running the program it will generate two files: "GramMatrix" (file with the gram matrix values) and "Supports" (file with support vectors and coeffecients). You can look at the source for more information about customizing options or implementation details.

Releases

No releases published

Packages

No packages published