neuraxle.steps.output_handlers

Module-level documentation for neuraxle.steps.output_handlers. Here is an inheritance diagram, including dependencies to other base modules of Neuraxle:

Inheritance diagram of neuraxle.steps.output_handlers

Output Handlers Steps

You can find here output handlers steps that changes especially the data outputs.

Classes

InputAndOutputTransformerMixin()

Base output transformer step that can modify data inputs, and expected_outputs at the same time.

InputAndOutputTransformerWrapper(wrapped, …)

Wrapper step to transform both data inputs, and expected output at the same.

OutputTransformerWrapper(wrapped[, …])

Transform expected output wrapper step that can sends the expected_outputs to the wrapped step so that it can transform the expected outputs.

Examples using neuraxle.steps.output_handlers.OutputTransformerWrapper


class neuraxle.steps.output_handlers.OutputTransformerWrapper(wrapped, cache_folder_when_no_handle=None)[source]

Bases: neuraxle.base.ForceHandleOnlyMixin, neuraxle.base.MetaStep

Transform expected output wrapper step that can sends the expected_outputs to the wrapped step so that it can transform the expected outputs.

__init__(wrapped, cache_folder_when_no_handle=None)[source]

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

_transform_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) → neuraxle.data_container.DataContainer[source]

Handle transform by passing expected outputs to the wrapped step transform method. Update the expected outputs with the outputs.

Parameters
Returns

data container

Return type

DataContainer

_fit_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) -> (<class 'neuraxle.base.BaseStep'>, <class 'neuraxle.data_container.DataContainer'>)[source]

Handle fit by passing expected outputs to the wrapped step fit method.

Parameters
Returns

self, data container

Return type

(BaseStep, DataContainer)

_fit_transform_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) -> (<class 'neuraxle.base.BaseStep'>, <class 'neuraxle.data_container.DataContainer'>)[source]

Handle fit transform by passing expected outputs to the wrapped step fit method. Update the expected outputs with the outputs.

Parameters
Returns

self, data container

Return type

(BaseStep, DataContainer)

handle_inverse_transform(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) → neuraxle.data_container.DataContainer[source]

Handle inverse transform by passing expected outputs to the wrapped step inverse transform method. Update the expected outputs with the outputs.

Parameters
Returns

data container

Return type

DataContainer

_set_expected_outputs(data_container, new_expected_outputs_data_container) → neuraxle.data_container.DataContainer[source]
_abc_impl = <_abc_data object>
class neuraxle.steps.output_handlers._DidProcessInputOutputHandlerMixin[source]

Bases: neuraxle.base.MixinForBaseTransformer

_did_process(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) → neuraxle.data_container.DataContainer[source]
class neuraxle.steps.output_handlers.InputAndOutputTransformerWrapper(wrapped, hashers: List[neuraxle.base.BaseHasher] = None, cache_folder_when_no_handle=None)[source]

Bases: neuraxle.steps.output_handlers._DidProcessInputOutputHandlerMixin, neuraxle.base.ForceHandleOnlyMixin, neuraxle.base.MetaStep

Wrapper step to transform both data inputs, and expected output at the same. It sends the data_inputs, and the expected_outputs to the wrapped step so that it can transform them.

__init__(wrapped, hashers: List[neuraxle.base.BaseHasher] = None, cache_folder_when_no_handle=None)[source]

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

_transform_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) → neuraxle.data_container.DataContainer[source]

Handle transform by passing data_inputs, and expected outputs to the wrapped step transform method. Update the expected outputs with the outputs.

Parameters
Returns

data container

Return type

DataContainer

_fit_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) -> (<class 'neuraxle.base.BaseStep'>, <class 'neuraxle.data_container.DataContainer'>)[source]

Handle fit by passing the data inputs, and the expected outputs to the wrapped step fit method.

Parameters
Returns

self, data container

Return type

(BaseStep, DataContainer)

_fit_transform_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) -> (<class 'neuraxle.base.BaseStep'>, <class 'neuraxle.data_container.DataContainer'>)[source]

Handle fit transform by passing the data inputs, and the expected outputs to the wrapped step fit method. Update the expected outputs with the outputs.

Parameters
Returns

self, data container

Return type

(BaseStep, DataContainer)

handle_inverse_transform(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) → neuraxle.data_container.DataContainer[source]

Handle inverse transform by passing the data inputs, and the expected outputs to the wrapped step inverse transform method. Update the expected outputs with the outputs.

Parameters
Returns

data container

Return type

DataContainer

_abc_impl = <_abc_data object>
class neuraxle.steps.output_handlers.InputAndOutputTransformerMixin[source]

Bases: neuraxle.steps.output_handlers._DidProcessInputOutputHandlerMixin

Base output transformer step that can modify data inputs, and expected_outputs at the same time.

_transform_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) → neuraxle.data_container.DataContainer[source]

Handle inverse transform by updating the data inputs, and expected outputs inside the data container.

Return type

DataContainer

Parameters
Returns

_fit_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) → neuraxle.base.BaseStep[source]

Handle transform by fitting the step, and updating the data inputs, and expected outputs inside the data container.

Parameters
Returns

_fit_transform_data_container(data_container: neuraxle.data_container.DataContainer, context: neuraxle.base.ExecutionContext) -> ('BaseStep', <class 'neuraxle.data_container.DataContainer'>)[source]

Handle transform by fitting the step, and updating the data inputs, and expected outputs inside the data container.

Parameters
Returns