Hey Joel,

I am afraid that I think that the GradientBoostingClassifier does not
implement the transform method.

Gaël

On Wed, Jul 17, 2013 at 07:42:20AM +1000, Joel Nothman wrote:
> Sorry, I made a mistake: unless the classifier has penalty=l1, its default
> feature selection threshold (as used in a pipeline currently) is the mean
> feature importance score.


> On Wed, Jul 17, 2013 at 7:11 AM, Joel Nothman <[email protected]>
> wrote:

>     For your example, Eustache, the following would work (with a dense or
>     sparse X):

>     """
>     clf = GradientBoostingClassifier()
>     clf.fit(X, y)
>     clf.fit(clf.transform(threshold=1e-3), y)
>     """

>     Alternatively, use a Pipeline:
>     """
>     clf = Pipeline([
>         ('sel', GradientBoostingClassifier()),
>         ('clf', GradientBoostingClassifier())
>     ])
>     clf.fit(X, y)
>     """
>     This will apply the default threshold (1e-5); currently the threshold 
> can't
>     be set for use in a pipeline, pending an issue that I can't currently
>     locate, which would move the threshold to the object as with randomized
>     l1's selection_threshold parameters.

>     The Pipeline examples include feature selectors, if only univariate. Is
>     there somewhere in the documentation you think these could be clearer? If
>     so, submit a PR.

>     - Joel


>     On Wed, Jul 17, 2013 at 3:49 AM, Olivier Grisel <[email protected]>
>     wrote:

>         Feature selectors should implement the `Transformer` API so that they
>         can be used in a Pipeline and make it possible to cross validate them.

>         The univariate feature selectors already implement the transformer 
> API:

>         http://scikit-learn.org/stable/modules/feature_selection.html#
>         univariate-feature-selection
-- 
    Gael Varoquaux
    Researcher, INRIA Parietal
    Laboratoire de Neuro-Imagerie Assistee par Ordinateur
    NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
    Phone:  ++ 33-1-69-08-79-68
    http://gael-varoquaux.info            http://twitter.com/GaelVaroquaux

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to