transform()

transform()#

ShiftScaleTransformer.transform(states, inplace: bool = False)[source]#

Apply the learned transformation.

Parameters:
states(n, …) ndarray

Matrix of n-dimensional snapshots, or a single snapshot.

inplacebool

If True, overwrite states during transformation. If False, create a copy of the data to transform.

Returns:
states_transformed: (n, …) ndarray

Matrix of n-dimensional transformed snapshots, or a single transformed snapshot.

Raises:
AttributeError

If the transformer is not ready because fit() or fit_transform() have not been called.

ValueError

If the states do not align with the state_dimension.