Digit Classification Using Support Vector Machine (SVM)
In this project, I implement digit classification using LibSVM
libarary.
Datasets
- The MNIST database of handwritten digits: http://yann.lecun.com/exdb/mnist/
Requirements
libsvm
: https://github.com/cjlin1/libsvmscipy.io
fromscipy
numpy
matplotlib
Testing Environment
- sysname:
Linux
- release:
4.15.0-45-generic
- machine:
x86_64
- python:
3.6.7
Results
How to reproduce the results
- Clone the
libsvm
repository:
git clone https://github.com/cjlin1/libsvm.git
- Clone my repository:
git clone https://github.com/lychengr3x/Digit-Classification-Using-SVM.git
- Move all my codes into directory
python
oflibsvm
:
cp -r Digit-Classification-Using-SVM/src/* libsvm/python/
- Follow instructions of README in the libsvm. For linux OS, go to the directory
libsvm/python
:
cd libsvm/python
make
- Note: If it does not work, go to the directory
libsvm
:
cd ..
make
- Now, you can execute the
run_linear_svm.py
andrun_rbf_svm.py
:
python run_linear_svm.py
python run_rbf_svm.py