Closed
Description
I am writing a text classification algorithm that uses an SVM based on tree kernels. I have the following code:
for tree_kernel in 'ptk', 'sptk', 'csptk':
kernel = TweetKernel(tree_kernel=tree_kernel)
svc = SVC(kernel=kernel)
svc.fit(X_train, y_train)
where X_train
contains some text columns. Unfortunately this is erroring out at the following line:
scikit-learn/sklearn/svm/base.py
Line 147 in 49da6c8
Please fix so that if a callable is passed for the kernel
argument, this restriction is not enforced.