check_observation_horizon_not_fitted¶
yohou.testing.check_observation_horizon_not_fitted(transformer, X)
¶
Check observation_horizon behavior before fit().
For transformers that inherit the base observation_horizon (no override), accessing it before fit() should raise NotFittedError. Transformers that override observation_horizon as a @property (computed from constructor params) are allowed to return a value before fit.
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
transformer
|
BaseActualTransformer
|
Unfitted transformer instance |
required |
X
|
DataFrame
|
Test data |
required |
Raises ¶
| Type | Description |
|---|---|
AssertionError
|
If observation_horizon returns a non-zero value before fit without an explicit property override |