Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Hard Margin SVM

This is the implementation of Hard Margin SVM (Hard Margin Support Vector Machine).

  • Class: 2
  • Problem: Linearly Separable
  • Decision Boundary: Hyperplane

Usage

1. Build

Please build the source file according to the procedure.

$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd ..

2. Dataset Setting

The following hierarchical relationships are recommended.

HardMargin-SVM_dataset

3. Execution

The following is an example for Toy Dataset.

Setting

Please set the shell for executable file.

$ vi scripts/toy.sh

If you want to view specific examples of command line arguments, please view "src/main.cpp" or add "--help" to the argument.

#!/bin/bash

DATA='toy'

./HardMargin-SVM \
    --dataset ${DATA} \
    --nd 2 \
    --lr 0.0001

Run

Please execute the following to start the program.

$ sh scripts/toy.sh

Formula

HardMargin-SVM_dual HardMargin-SVM_obj HardMargin-SVM_delta HardMargin-SVM_update HardMargin-SVM_class

Algorithm

train test