check_rewind_transform_behavior¶
yohou.testing.transformer.check_rewind_transform_behavior(transformer, X, y=None)
¶
Check rewind_transform() behavior and contract.
Verifies that rewind_transform(): 1. Does not use pre-existing _X_observed from transformer's memory 2. Calls transform() and discards the first observation_horizon values 3. Resets the internal state with the input data
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
transformer
|
BaseTransformer
|
Unfitted transformer |
required |
X
|
DataFrame
|
Training data (needs to be long enough) |
required |
y
|
DataFrame
|
Target data |
None
|
Raises¶
| Type | Description |
|---|---|
AssertionError
|
If rewind_transform doesn't follow the expected contract |