Author: Yin-tao Xu | Date: 2018/9/10
This repository is an interactive guidance for setting up a hard-margin SVM binary classifer. The interactive tutorial bases on cvxopt and Jupyter notebook. The very beginning idea to start this repository is to offer a case study for my blog: author's CSDN blog(Chinese).
Hard-Margin SVM can be transformed into a standard QP problem. For beginners or researchers focusing on application, it is challenging to implement very detailed numerical optimization method. Rely on magic boxes in cvxopt package, you are able to derive the solution with only one command! At the same time, you are able to grasp critical points of SVM modeling.
- Well-designed visualization of the decision boundary!
- A quick start to get familiar with cvxopt .
-
Get familiar with the basic modeling of the hard-margin SVM.
-
Get familiar with the idea of how to transforming into a QP-Problem
-
Have cvxopt installed. Install insturction
-
Python 3(Basic Concept of function, import, OOP, etc.)
-
Numpy,Jupyter Notebook, matplotlib, etc, Anaconda is a one-stage solution instead of manually installing these frequently used 3-rd party package.
Here are two tutorials in English (Note from standformd CS229) and Chinese(author's CSDN blog).
Note: For notes in standford, first 7 pages will provide you with enough background knowledge about SVM(before lagrange duality).
- Open terminal at target directory(anywhere you want to start this interactive tutorial)
- follow these steps:
git clone https://github.com/liubai01/hard-margin-SVM-tutorial-by-cvxopt.git
cd hard-margin-SVM-tutorial-by-cvxopt/
jupyter notebook
Finally, open your browser to connect your Jupyter session. Open SVM_HARD.ipynb
directly.
More case studies of machine learning can be found in my repositories[link]!