fit_transform()

fit_transform()#

ScaleTransformer.fit_transform(states, inplace=False)[source]#

Set the state_dimension if scaler is not an array, and apply the scaling.

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_scaled: (n, …) ndarray

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

Raises:
ValueError

If the states do not align with the state_dimension (only when scaler is an array).