fit_transform()#
- ScaleTransformer.fit_transform(states, inplace=False)[source]#
Set the
state_dimension
ifscaler
is not an array, and 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 scaled snapshots, or a single scaled snapshot.
- Raises:
- ValueError
If the
states
do not align with thestate_dimension
(only whenscaler
is an array).