fit_transform()#
- ShiftTransformer.fit_transform(states, inplace: bool = False)[source]#
Apply the shift.
This method is equivalent to
transform()
because the transformation is not learned from data (there is nothing to “fit”).- 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_shifted: (n, …) ndarray
Matrix of n-dimensional shifted snapshots, or a single shifted snapshot.
- Raises:
- ValueError
If the
states
do not align with thestate_dimension
.