I am getting the same error for other kernels like rbf, Gaussian. Can you please suggest any modifications in code. I would also request to suggest inclusion of other useful kernels in my code for improvement of classification accuracy.