InputConsistencyChecker#
- class openstef_models.transforms.validation.input_consistency_checker.InputConsistencyChecker(**data: Any) None[source]
Bases:
BaseConfig,TimeSeriesTransformValidates input data consistency during transform operations.
Ensures that input features match those seen during fitting and maintains consistent column ordering. Logs warnings and removes extra columns.
Invariants
Must be fitted before transform() can be called
Validates presence of all features seen during fitting
Logs warnings for extra columns not seen during fitting
Removes extra columns from output
Maintains consistent column ordering in output
- Parameters:
data (
Any)
- property is_fitted: bool
Check if the transform has been fitted.
- fit(data: TimeSeriesDataset) None[source]
Fit the transform to the input data.
This method should be called before applying the transform to the data. It allows the transform to learn any necessary parameters from the data.
- Parameters:
data (
TimeSeriesDataset) – The input data to fit the transform on.data
- Return type:
- transform(data: TimeSeriesDataset) TimeSeriesDataset[source]
Transform the input data.
This method should apply a transformation to the input data and return a new instance.
- Parameters:
data (
TimeSeriesDataset) – The input data to be transformed.data
- Returns:
A new instance of the transformed data.
- Raises:
NotFittedError – If the transform has not been fitted yet.
- Return type:
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'protected_namespaces': ()}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].