I see. But in my case I have things like for i in xrange(0, num_experiments): estimators = # some pipeline etc...
so estimators should be "re-created" everytime. In any case, I recently changed my code and I am no longer using lists. With scalar numbers I think it is working and I see the correct number all the time and from both __init__ and fit(). I'm not sure if sklearn is supposed to support lists as parameters. But for now I'm no longer using lists . Thank you, -----Original Message----- From: Andy [mailto:t3k...@gmail.com] Sent: Tuesday, February 17, 2015 6:42 PM To: scikit-learn-general@lists.sourceforge.net Subject: Re: [Scikit-learn-general] custom regressor keeps failing On 02/16/2015 03:58 PM, Vlad Niculae wrote: > > >> 1) Except for the first iteration of grid search, all other times the >> lists I print from within __init__() function are None > I’m not 100% sure but I think this is expected. You are only printing things > from `__init__`, but grid search might end up calling `set_params` on the > same object, rather than building a new one (depends on whether n_jobs > 1?). > Your estimator should support this. This is what always happens, and that is the whole point of ``set_params``. After all, you are passing an object, not a class, and you could have other attributes set. It will always clone the estimator and do "set_params" on it, independent of n_jobs. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general