svm_cpp icon indicating copy to clipboard operation
svm_cpp copied to clipboard

Support Vector Machines Implementation from scratch in C++

SVM C++ Samples

These are sample programs of Support Vector Machines from scratch in C++.

1. Implementation

Model Class Problem Decision Boundary Code
Hard Margin SVM 2 Linearly Separable Hyperplane HardMargin-SVM
Soft Margin SVM 2 Linearly Non-separable Hyperplane SoftMargin-SVM
Kernel SVM 2 Linearly Non-separable Hyperplane + Kernel Kernel-SVM
OC-SVM 1 Linearly Non-separable Hyperplane + Kernel OC-SVM
SVDD 1 Linearly Non-separable Hypersphere + Kernel SVDD

2. Requirement

Boost

This is used for command line arguments, etc.

$ sudo apt install libboost-dev libboost-all-dev

3. Preparation

Git Clone

$ git clone https://github.com/koba-jon/svm_cpp.git
$ cd svm_cpp

4. Execution

  • Hard Margin SVM (Hard Margin Support Vector Machine)
  • Soft Margin SVM (Soft Margin Support Vector Machine)
  • Kernel SVM (Non-linear Support Vector Machine)
  • OC-SVM (One Class Support Vector Machine)
  • SVDD (Support Vector Data Description)

5. License

This repository: MIT License

3rd-Party Libraries

  • Boost
    Official : https://www.boost.org/
    License : https://www.boost.org/users/license.html

References

  • https://qiita.com/ta-ka/items/e6fd0b6fc46dbab4a651 (Japanese)
  • https://www.slideshare.net/ssuser186f56/svm-146231602 (Japanese)