check_transform_drops_warmup_rows¶
yohou.testing.transformer.check_transform_drops_warmup_rows(transformer, X, y=None)
¶
Check stateful transformers drop exactly observation_horizon rows.
Stateful transformers (observation_horizon > 0) must drop the first observation_horizon rows in their transform() output. Stateless transformers are skipped (they may legitimately change row count, e.g. Downsampler).
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
transformer
|
BaseTransformer
|
Unfitted transformer |
required |
X
|
DataFrame
|
Training data (must have enough rows) |
required |
y
|
DataFrame
|
Target data |
None
|
Raises¶
| Type | Description |
|---|---|
AssertionError
|
If the number of dropped rows doesn't match observation_horizon |