transform()#
- ScaleTransformer.transform(states, inplace=False)[source]#
Apply the scaling.
- Parameters:
- states(n, …) ndarray
Matrix of n-dimensional snapshots, or a single snapshot.
- inplacebool
If
True
, overwritestates
during transformation. IfFalse
, create a copy of the data to transform.
- Returns:
- states_scaled: (n, …) ndarray
Matrix of n-dimensional shifted snapshots, or a single shifted snapshot.
- Raises:
- AttributeError
If
scaler
is a number (not an array) butfit()
orfit_transform()
have not been called yet.- ValueError
If the
states
do not align with thestate_dimension
.