simpleml.pipelines.ordered_dict.external_pipeline

External pipeline support for native python pipeline

Module Contents

Classes

OrderedDictExternalPipeline

Use default dictionary behavior but add wrapper methods for

Attributes

__author__

simpleml.pipelines.ordered_dict.external_pipeline.__author__ = Elisha Yadgaran[source]
class simpleml.pipelines.ordered_dict.external_pipeline.OrderedDictExternalPipeline[source]

Bases: collections.OrderedDict, simpleml.pipelines.external_pipelines.ExternalPipelineMixin

Use default dictionary behavior but add wrapper methods for extended functionality

Initialize self. See help(type(self)) for accurate signature.

add_transformer(self, name, transformer)[source]

Setter method for new transformer step

Parameters
  • name (str) –

  • transformer (Any) –

Return type

None

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

Iterate through each transformation step and apply fit

Parameters
  • X (Any) –

  • y (Optional[Any]) –

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

Iterate through each transformation step and apply fit and transform

Parameters
  • X (Any) –

  • y (Optional[Any]) –

Return type

Any

get_feature_names(self, 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[str]) – list of initial feature names before transformations

Type

list

Return type

List[str]

get_params(self, params_only=None, **kwargs)[source]

Iterate through transformers and return parameters

Parameters

params_only (Optional[bool]) – Unused parameter to align signature with Sklearn version

Return type

Dict[str, Any]

get_transformers(self)[source]

Get list of (step, transformer) tuples

Return type

List[Tuple[str, str]]

remove_transformer(self, name)[source]

Delete method for transformer step

Parameters

name (str) –

Return type

None

set_params(self, **params)[source]

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

Parameters

params – dictionary of dictionaries. each dictionary must map to

Return type

None

a transformer step

transform(self, X, **kwargs)[source]

Iterate through each transformation step and apply transform

Parameters

X (Any) –

Return type

Any