pipefitter.pipeline.Pipeline

class pipefitter.pipeline.Pipeline(stages)

Bases: object

Execute a series of transformers and estimators

Parameters:

stages : one or more transformers/estimators

The stages of the pipeline to execute

Returns:

Pipeline

Examples

Basic pipeline of imputers and an estimator:

>>> mean_imp = Imputer(Imputer.MEAN)
>>> mode_imp = Imputer(Imputer.MODE)
>>> dtree = DecisionTree(target='Origin',
...                      nominals=['Type', 'Cylinders', 'Origin'],
...                      inputs=['MPG_City', 'MPG_Highway', 'Length',
...                              'Weight', 'Type', 'Cylinders'])
>>> pipe = Pipeline([mean_imp, mode_imp, dtree])
__init__(stages)

Methods

__init__(stages)
fit(table, \*args, \*\*kwargs) Train the models using the stages in the pipeline
set_params(\*args, \*\*kwargs) Set additional parameters for the estimators in the pipeline
transform(table, \*args, \*\*kwargs) Execute the transformations in this pipeline only