diffengine.datasets.transforms.base¶
Module Contents¶
Classes¶
Base class for all transformations. |
- class diffengine.datasets.transforms.base.BaseTransform[source]¶
Base class for all transformations.
- __call__(results)[source]¶
Call function to transform data.
- Parameters:
results (dict) –
- Return type:
dict | tuple[list, list] | None
- abstract transform(results)[source]¶
Transform the data.
The transform function. All subclass of BaseTransform should override this method.
This function takes the result dict as the input, and can add new items to the dict or modify existing items in the dict. And the result dict will be returned in the end, which allows to concate multiple transforms into a pipeline.
Args:¶
results (dict): The result dict.
Returns:¶
dict: The result dict.
- Parameters:
results (dict) –
- Return type:
dict | tuple[list, list] | None