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?


On Tue, Dec 3, 2013 at 8:33 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
>
> OK, I now understand the difference with what was implemented.
>
> But I really frown on it: you are adding a special behavior that is
> documented nowhere and hard to discover. Special cases are bad in general,
> and this one seems very cornercase.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scikit-learn/scikit-learn/pull/2630/files#r8040953>
> .
>