Implement a simple svm with smo algorithm