check_observe_concatenates_memory¶
yohou.testing.check_observe_concatenates_memory(transformer, X, y=None)
¶
Check observe() appends new data and maintains horizon size.
The observe() method should append new observations to _X_observed and trim to observation_horizon length.
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
transformer
|
BaseActualTransformer
|
Unfitted transformer |
required |
X
|
DataFrame
|
Initial training data |
required |
y
|
DataFrame
|
Target data |
None
|
Raises ¶
| Type | Description |
|---|---|
AssertionError
|
If observe() doesn't properly maintain memory |
Notes ¶
For stateless transformers (observation_horizon == 0) _X_observed is always
an empty frame, so both length assertions resolve to 0 <= 0 and
0 == 0; no meaningful memory behavior is exercised for that class.