fit_transform()#
- ScaleTransformer.fit_transform(states, inplace=False)[source]#
Set the
state_dimensionifscaleris not an array, and apply the scaling.- Parameters:
- states(n, …) ndarray
Matrix of n-dimensional snapshots, or a single snapshot.
- inplacebool
If
True, overwritestatesduring transformation. IfFalse, 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
statesdo not align with thestate_dimension(only whenscaleris an array).