8000 SVC: Do not enforce that input data is of type np.float64 · Issue #10713 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
SVC: Do not enforce that input data is of type np.float64 #10713
Closed
@jamesqo

Description

@jamesqo

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0