Of course, and I think I've loudly stated my problems with this solution,
and I generally don't support it; yet it does target a use case I've not
before considered, and in reviewing it both you and I got bogged down in
critiquing the solution rather than considering the problem.

I agree, we need to collect issues with Pipeline (and generally
meta-estimator) API design.

And yet the scorer API still has some substantial deficiencies that we've
been labouring but progressing little towards solving (support for
recording multiple metrics like P, R and F or multiple classes, while using
one objective; the regression cases ?mblondel recently posted an issue
about). So from such a process we can expect little more than a somewhat
more well-considered mess.


On Tue, Dec 3, 2013 at 8:50 AM, Gael Varoquaux <notifications@github.com>wrote:

>  In sklearn/pipeline.py:
>
> >      # Estimator interface
> > -
> > +
> > +    def _extract_params(self, **params):
> > +        params_steps = dict((step, {}) for step, _ in self.steps)
> > +        for pname, pval in six.iteritems(params):
> > +            try:
> > +                step, param = pname.split('__', 1)
> > +                params_steps[step][param] = pval
> > +            except ValueError:
> > +                # In this case, the argument will be applied to
> > +                # all steps in the pipeline
> > +                param = pname
> > +                for params_step in params_steps.values():
> > +                    params_step[param] = pval
> > +        return params_steps
>
> Gaël, the question for you is: how would you suggest enabling a Pipeline
> to be used within AdaBoost, or enabling AdaBoost to be used with a Pipeline
> base estimator?
> I don't know. I just can feel that there are a bunch of issue with the
> pipeline API, that we need all to write them in a design discussion
> document, accumulate usecases and someone brave needs to figure out how to
> move to the next step. This is what @amueller<https://github.com/amueller>did with the scorer API. It was a lot of tedious work. But after all this
> work, we got something that was much more than incremental, and really
> helped solving a lot of problems.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scikit-learn/scikit-learn/pull/2630/files#r8041550>
> .
>