Closed tungen closed 8 years ago
@tungen It seems that there is some problem with your documentation of the kernel parameter. It seems to be taking in a shape (n_samples, n_samples) ndarray instead of a sklearn.metrics.pairwise.*_kernel object.
I would suggest consider sklearn's interface in SVC. http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html http://scikit-learn.org/stable/auto_examples/svm/plot_custom_kernel.html#example-svm-plot-custom-kernel-py
you would add three parameters degree, gamma, coef0
for the parameter popular kernels.
the kernel
parameter takes in a string ('rbf', 'sigmoid', 'linear', 'sigmoid') or a callable (function).
As for the precomputed
option, since we have both labeled data and unlabeled data, It might confuse the users on how to generate such matrix. (and in our case, the dataset object is combined in the query strategy)
By the way, you should also add test for callable option in unittest.
@yangarbiter please help review the new commit, thanks.
@tungen
kernel : string, optional (default='rbf')
should be on line 27
kernel : {'linear', 'poly', 'rbf', callable}, optional (default='rbf')
and this line If none is given, 'rbf' will be used.
should be removed.
your should remove debug code print('use callable')
on line 87
@yangarbiter done, please check.
Looks good to me.
@yangarbiter @iamyuanchung please see the changes made to quire thanks.