-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Closed
Labels
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
X, y = check_X_y(X, y, dtype=np.float64, order='C', accept_sparse='csr') |
Please fix so that if a callable is passed for the kernel
argument, this restriction is not enforced.