Preprocessing

../../../../../../_images/MLPro-OA-Preprocessing-Tasks_class_diagram.drawio.png

Ver. 2.0.0 (2025-06-30)

This module provides implementation for adaptive normalizers for MinMax Normalization.

class mlpro.oa.streams.tasks.normalizers.minmax.NormalizerMinMax(p_name: str = None, p_range_max=1, p_ada: bool = True, p_duplicate_data: bool = False, p_visualize: bool = False, p_logging=True, p_dst_boundaries: list = [-1, 1], **p_kwargs)

Bases: NormalizerMinMax, OAStreamNormalizer

Class with functionality for adaptive normalization of instances using MinMax Normalization.

Parameters:
  • p_name (str = None,) – Optional name of the task.

  • p_range_max – Processing range of the task, default is a Thread.

  • p_ada (bool) – True if the task has adaptivity, default is true.

  • p_duplicate_data (bool) – If True, instances will be duplicated before processing. Default = False.

  • p_visualize – True for visualization, false by default.

  • p_logging – Logging level of the task. Default is Log.C_LOG_ALL

  • p_dst_boundaries (list = [-1,1]) – Explicit list of (low, high) destination boundaries. Default is [-1, 1].

  • **p_kwargs – Additional task parameters

C_NAME = 'MinMax'
_run(p_instances: Dict[int, Tuple[str, Instance]])

Runs MinMax Normalizer task for normalizing stream instances.

Parameters:

p_instances (InstDict) – Instances to be processed

_adapt_on_event(p_event_id: str, p_event_object: Event) bool

Custom method to adapt the MinMax normalizer parameters based on event raised by Boundary object for changed boundaries.

Parameters:
  • p_event_id (str) – Event id of the raised event

  • p_event_obj (Event) – Event object that raises the corresponding event

Returns:

Returns True, if the task has adapted. False otherwise.

Return type:

bool

_update_plot_data_2d()

Updates the 2D plot data after parameter changes by renormalizing the existing points.

_update_plot_data_3d()

Method to update the 3d plot for Normalizer. Extended to renormalize the obsolete data on change of parameters.

_update_plot_data_nd()

Method to update the nd plot for Normalizer. Extended to renormalize the obsolete data on change of parameters.

Ver. 2.1.0 (2025-07-05)

This module provides implementation for adaptive normalizers for ZTransformation

class mlpro.oa.streams.tasks.normalizers.ztrans.NormalizerZTransform(p_name: str = None, p_range_max=1, p_ada: bool = True, p_duplicate_data: bool = False, p_visualize=False, p_logging=True, **p_kwargs)

Bases: NormalizerZTrans, OAStreamNormalizer

Online-adaptive normalization of instances with Z-transformation.

Parameters:
  • p_name (str, optional) – Name of the task.

  • p_range_max – Processing range of the task, default is a Thread.

  • p_ada – True if the task has adaptivity, default is true.

  • p_duplicate_data (bool) – If True, instances will be duplicated before processing. Default = False.

  • p_visualize – True for visualization, false by default.

  • p_logging – Logging level of the task. Default is Log.C_LOG_ALL

  • **p_kwargs – Additional task parameters

C_NAME = 'ZTrans'
_run(p_instances: Dict[int, Tuple[str, Instance]])

Custom method to for run Z-transform task for normalizing new instances and denormalizing deleted instances.

Parameters:

p_instances (InstDict) – Stream instances to be processed

_adapt(p_instance_new: Instance) bool

Custom method to for adapting of Z-transform parameters on new instances.

Parameters:

p_instance_new (Instance) – Instance to be adapted on.

Returns:

adapted – Returns True, if task has adapted.

Return type:

bool

_adapt_reverse(p_instance_del: Instance) bool

Custom method to for adapting of Z-transform parameters on deleted instances.

Parameters:

p_instance_del (Instance) – Instance to be adapted on.

Returns:

adapted – Returns True, if task has adapted.

Return type:

bool

_update_plot_data_2d()

Updates the 2D plot data after parameter changes by renormalizing the existing points.

_update_plot_data_3d()

Method to update the 3d plot for Normalizer. Extended to renormalize the obsolete data on change of parameters.

_update_plot_data_nd()

Method to update the nd plot for Normalizer. Extended to renormalize the obsolete data on change of parameters.

_update_plot_data()

Updates the plot data.