simpleml.pipelines.external_pipelines module

Wrapper class for a pickleable pipeline of a series of transformers

class simpleml.pipelines.external_pipelines.DefaultPipeline[source]

Bases: collections.OrderedDict

Use default dictionary behavior but add wrapper methods for extended functionality

add_transformer(name, transformer)[source]

Setter method for new transformer step

fit(X, y=None, **kwargs)[source]

Iterate through each transformation step and apply fit

fit_transform(X, y=None, **kwargs)[source]

Iterate through each transformation step and apply fit and transform

get_feature_names(feature_names)[source]

Iterate through each transformer and return list of resulting features starts with empty list by default but can pass in dataset as starting point to guide transformations

Parameters:feature_names – list of initial feature names before transformations
Type:list
get_params(**kwargs)[source]

Iterate through transformers and return parameters

get_transformers()[source]

Get list of (step, transformer) tuples

remove_transformer(name)[source]

Delete method for transformer step

set_params(**params)[source]

Set params for transformers. Input is expected to be dict of dict

Parameters:params – dictionary of dictionaries. each dictionary must map to

a transformer step

transform(X, **kwargs)[source]

Iterate through each transformation step and apply transform

class simpleml.pipelines.external_pipelines.SklearnPipeline(steps, memory=None)[source]

Bases: sklearn.pipeline.Pipeline

Use default sklearn behavior but add wrapper methods for extended functionality

add_transformer(name, transformer, index=None)[source]

Setter method for new transformer step

get_feature_names(feature_names)[source]

Iterate through each transformer and return list of resulting features starts with empty list by default but can pass in dataset as starting point to guide transformations

Parameters:feature_names – list of initial feature names before transformations
Type:list
get_transformers()[source]

Get list of (step, transformer) tuples

remove_transformer(name)[source]

Delete method for transformer step