Re: [Scikit-learn-general] GridSearchCV and precomputed kernel

2012-02-23 Thread Emanuele Olivetti
On 02/23/2012 02:37 PM, Adrien Gaidon wrote: > > Some time ago, I had sent a quick fix using the second approach Matthieu > mentioned. I've > been using it successfully in my own code for some time. > > I cleaned it up a little bit and added a test. The pull request is here: > https://github.com

Re: [Scikit-learn-general] GridSearchCV and precomputed kernel

2012-02-23 Thread Adrien Gaidon
Hi, 2012/2/23 Mathieu Blondel > On Thu, Feb 23, 2012 at 12:53 PM, Gael Varoquaux > wrote: > > > I don't think so. It is clearly a flaw of the current design. Anybody who > > has an elegant solution to proposed will be greeted with much rejoicing > > We could add a squared_matrix=True|False opti

Re: [Scikit-learn-general] GridSearchCV and precomputed kernel

2012-02-23 Thread Mathieu Blondel
On Thu, Feb 23, 2012 at 12:53 PM, Gael Varoquaux wrote: > I don't think so. It is clearly a flaw of the current design. Anybody who > has an elegant solution to proposed will be greeted with much rejoicing We could add a squared_matrix=True|False option to the constructor of GridSearchCV or we c

[Scikit-learn-general] strange behavior while using permutation_test_score

2012-02-23 Thread Matthias Ekman
Hi, I only recently started using sklearn and it's an impressive and well documented library. Thanks! I run into some strange behavior while using the function 'permutation_test_score'. When using permutation_test_score with n_permutations = 50, everything looks alright In [4]: cv_scores, perm

Re: [Scikit-learn-general] GridSearchCV and precomputed kernel

2012-02-23 Thread Gael Varoquaux
On Thu, Feb 23, 2012 at 12:07:54PM +0100, Emanuele Olivetti wrote: > Is there a ready-made solution to this? I don't think so. It is clearly a flaw of the current design. Anybody who has an elegant solution to proposed will be greeted with much rejoicing :). G ---

[Scikit-learn-general] GridSearchCV and precomputed kernel

2012-02-23 Thread Emanuele Olivetti
Hi, While playing with GridSearchCV and an SVM with precomputed kernel I came across the issue that cross-validation seems not to slice the precomputed kernel in the proper way during fit(). Here is a minimal example: --- import numpy as np from sklearn.grid_search import GridSearchCV from sklear