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
>
> --
> Olivier
>
>
> ------------------------------------------------------------------------------
> 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
>
------------------------------------------------------------------------------
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