/linear_svm

linear support vector machine method with squared hinge loss regularization

Creative Commons Attribution 4.0 InternationalCC-BY-4.0

linear_svm

This repository provides examples of how to use the linear support vector machine method with squared hinge loss regularization. See the examples folder for an example with simulated data and an example with the Spam email data.

As shown in the demo file, the Spam data can be downloaded from this website:

https://statweb.stanford.edu/~tibs/ElemStatLearn/datasets/spam.data.

And the response or test_indicator, i.e. whether the email is Spam or not, can be found at:

https://statweb.stanford.edu/~tibs/ElemStatLearn/datasets/spam.traintest.

In order to run the code, you first need to install these modules:

matplotlib
numpy
pandas
scipy
sklearn

It's best to install the libraries with Anaconda, rather than installing them with pip, so you get all the
dependency modules that are required for each of these libraries.