Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG] DOC a note on data leakage and pipeline #9510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions doc/modules/pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ into one. This is useful as there is often a fixed sequence
of steps in processing the data, for example feature selection, normalization
and classification. :class:`Pipeline` serves two purposes here:

**Convenience**: You only have to call ``fit`` and ``predict`` once on your
Convenience and encapsulation
You only have to call ``fit`` and ``predict`` once on your
data to fit a whole sequence of estimators.

**Joint parameter selection**: You can :ref:`grid search <grid_search>`
Joint parameter selection
You can :ref:`grid search <grid_search>`
over parameters of all estimators in the pipeline at once.
Safety
Pipelines help avoid leaking statistics from your test data into the
trained model in cross-validation, by ensuring that the same samples are
used to train the transformers and predictors.

All estimators in a pipeline, except the last one, must be transformers
(i.e. must have a ``transform`` method).
Expand Down