Skip to content

rlefmann/LinearSVM.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinearSVM

This package provides algorithms for solving the linear SVM problem.

WARNING: This is a work in progress

ADMM

Uses the ADMM framework to solve linear SVM in parallel. The algorithm is developed by Caoxie Zhang, Honglak Lee and Kang G. Shin. For solving the subproblem the dual coordinate descent method is used.

Start a Julia session and create worker processes, e.g.

julia -p 4
using LinearSVM

# Load a dataset:
(train_x, train_y, test_x, test_y) = loadDataset("./spambase.data") # or whatever dataset you are using

# Distribute the dataset to the worker processes:
x,y = distributeData(train_x, train_y)

# run the ADMM algorithm:
w = admm(x,y,parallel=true)

# evaluate accuracy on test set:
testResult(w,test_x,test_y)

Pegasos

The Pegasos (primal estimated sub-gradient solver) method by Shai Shalev-Shwartz, Yoram Singer, Nathan Srebro and Andrew Cotter.

using LinearSVM

(train_x, train_y, test_x, test_y) = loadDataset("./spambase.data") # or whatever dataset you are using
w = pegasos(train_x, train_y, lambda=0.1, batchsize=10, projection=true)
testResult(w,test_x,test_y)

Dual Coordinate Descent

The Dual Coordinate Descent method by Cho-Jui Hsieh, Kai-Wei Chang, Chih-Jen Lin, S. Sathiya Keerthi and S. Sundararajan.

using LinearSVM

(train_x, train_y, test_x, test_y) = loadDataset("./spambase.data") # or whatever dataset you are using
w = dualcd(train_x, train_y,C=6.0, shrinking=true)
testResult(w,test_x,test_y)

About

Implementation of linear SVM solvers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages