1
$\begingroup$

I would like to use scikit-learn's GridSearchCV() to do a grid search on custom parameters in a kernel I have specified. Specifically, the kernel is of the form

SeqKernel(x, y, orig_kernel, cut_off, order)

Here, orig_kernel is a kernel typically used in SVM learning (such as linear, polynomial, RBF, or sigmoid). I wish to perform a grid search over values of cut_off and order, with the additional caveat that only the pairs such that order $\le$ cut_off are considered. What would be the best way to implement this?

$\endgroup$
0
$\begingroup$

Look at the source code and modify it to meet your conditions.

https://github.com/scikit-learn/scikit-learn/blob/ab93d65/sklearn/model_selection/_search.py#L685

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.