Added some kernel functions for svm