check_rewind_updates_memory¶
yohou.testing.check_rewind_updates_memory(transformer, X, y=None)
¶
Check rewind(X) sets _X_observed to X.tail(observation_horizon).
The rewind() method should update the transformer's memory to contain only the last observation_horizon rows of the provided data.
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
transformer
|
BaseActualTransformer
|
Unfitted transformer |
required |
X
|
DataFrame
|
Training data (should have at least observation_horizon rows) |
required |
y
|
DataFrame
|
Target data |
None
|
Raises ¶
| Type | Description |
|---|---|
AssertionError
|
If _X_observed is not properly updated |
Notes ¶
For stateless transformers (observation_horizon == 0) the expected memory is an empty frame, so the assertions hold trivially; no memory behavior is exercised. The check is also a no-op when len(X) < observation_horizon.