edges.modeling.data_transforms

Module defining transforms of data that occur pre-fitting.

class edges.modeling.data_transforms.DataTransform[source]

A base class for model transforms.

A DataTransform must implement both the transform and inverse methods. These methods may take both the response variable (x) and the data and return some transformed data. This transformed data will be what is actually fit by the model (and the inverse transform will be applied to fit evaluations to take them back to the space of the data).

classmethod from_file(path: str | Path | Group)

Load an HDF5 file as a given type.

classmethod get(model: str) type[Self][source]

Get a ModelTransform class.

abstractmethod inverse(x: ndarray, data: ndarray) ndarray[source]

Transform the data.

abstractmethod transform(x: ndarray, data: ndarray) ndarray[source]

Transform the data.

write(path: str | Path | Group)

Write an attrs class to HDF5.

class edges.modeling.data_transforms.IdentityTransform[source]

A transform that does nothing.

inverse(x: ndarray, trns: ndarray) ndarray[source]

Inverse transform the data.

transform(x: ndarray, data: ndarray) ndarray[source]

Transform the data.