I am using sklearn for python to perform cross validation using SVMs. I tried with the linear and rbf kernels and it all works fine. When i run it with the polynomial kernel though it never finishes. It has been running for 8 hours and still nothing. The dimensionality of the input X is (1422, 2)
def SupportVectorMachines(X,y):
clf = svm.SVC(C=1.0, kernel='poly', degree=3, gamma=2)
classifier = clf.fit(X,y)
score = cross_validation.cross_val_score(classifier, X,y, cv=10, n_jobs=1).mean()
return score
Any ideas why is that?
Thanks