Base Tansform module

causalai.data.transforms.base

class causalai.data.transforms.base.BaseTransform(**kwargs)

Common Base Transform class for both time series data and tabular data

__init__(**kwargs)
abstract fit(*data: List[ndarray])

Function that transforms the data arrays and stores any transformation parameter associated with the transform as a class attribute (E.g. mean, variance)

Parameters:

data (ndarray) -- Numpy array of shape (observations N, variables D)

abstract transform(*data: List[ndarray] | ndarray)

Function that returns the transformed data array list using the transform learned using the fit function

Parameters:

data (ndarray) -- Numpy array of shape (observations N, variables D)

Returns:

transformed data

Return type:

ndarray or list of ndarray