pipefitter.pipeline.PipelineModel.transform

PipelineModel.transform(table)

Run the transforms in the trained pipeline

Parameters:

table : data set

A data set that is of the same type as the training data set

Returns:

data set

A data set of the same type that was passed in table

Examples

Basic pipeline model transform using 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])
>>> model = pipe.fit(training_data)
>>> new_table = model.transform(data)