This package provides algorithms for solving the linear SVM problem.
WARNING: This is a work in progress
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)
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)
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)