Pipeline

../../../../_images/pipeline.svg

Applies one model on the output of another

Documentation

Creates a sequence of data transformers with an optional final predictor.

Intermediate steps of the pipeline must be transformers, that is, they must implement fit and transform methods. The final estimator only needs to implement fit. The transformers in the pipeline can be cached using memory argument. The pipline serves multiple purposes:

  • It assembles several steps that can be cross-validated together while setting different parameters.

  • Only one fit/predict call for the whole sequence.

  • Avoid statistics leaking from test to train in cross-validation.

Definition

Input ports

models
Type: model
Description: models
Optional number of ports: 2–inf (default: 2)

Output ports

out-model
Type: model
Description: Output model

Configuration

Flatten (flatten)

Flattens multiple pipeline objects into a single pipeline containing all models

Model names (names)

Comma separated list of model names, eg. Rescale, SVC. If fewer names are given than models then default names will be used.

Examples

The node can be found in:

Implementation

class node_pipeline.Pipeline[source]