Rearranger
Ver. 1.0.3 (2022-12-19)
This module provides a stream task class Rearranger to rearrange the feature and label space of instances.
- class mlpro.bf.streams.tasks.rearranger.Rearranger(p_name: str = None, p_range_max=1, p_duplicate_data: bool = False, p_visualize: bool = False, p_logging=True, p_features_new: list = [], p_labels_new: list = [], **p_kwargs)
Bases:
StreamTask
This stream task rearrange the feature and/or label data of incoming instances. To this regard, two additional parameters p_features_new and p_labels_new describe the dimensions of the feature/label space of the resulting instances.
- Parameters:
p_name (str) – Optional name of the task. Default is None.
p_range_max (int) – Maximum range of asynchonicity. See class Range. Default is Range.C_RANGE_PROCESS.
p_duplicate_data (bool) – If True, instances will be duplicated before processing. Default = False.
p_visualize (bool) – Boolean switch for visualisation. Default = False.
p_logging – Log level (see constants of class Log). Default: Log.C_LOG_ALL
p_features_new (list) – List of resulting features that are described as tuples ( ‘F’ or ‘L’, list[Dimension] ). The first component specifies the origin (‘F’ = feature space, ‘L’ = label space). The second component is a list of dimension objects.
p_labels_new (list[Label]) – List of resulting labels that are described as tuples ( ‘F’ or ‘L’, list[Dimension] ).
p_kwargs (dict) – Further optional named parameters.
- C_NAME = 'Rearranger'
- C_PLOT_STANDALONE: bool = True
- _run(p_inst_new: set, p_inst_del: set)
Custom method that is called by method run().
- Parameters:
p_inst_new (set) – Set of new stream instances to be processed.
p_inst_del (set) – Set of obsolete stream instances to be removed.