Basic soft-margin kernel SVM implementation in Python