nirs4all.controllers.transforms.transformer module
- class nirs4all.controllers.transforms.transformer.TransformerMixinController[source]
Bases:
OperatorController- execute(step_info: ParsedStep, dataset: SpectroDataset, context: ExecutionContext, runtime_context: RuntimeContext, source: int = -1, mode: str = 'train', loaded_binaries: List[Tuple[str, Any]] | None = None, prediction_store: Any | None = None)[source]
Execute transformer - handles normal, feature augmentation, and sample augmentation modes.
Supports optional fit_on_all parameter in step configuration to fit the transformer on all data instead of just training data. This is useful for unsupervised preprocessing where you want the transformation to capture the full data distribution.
- Step format:
# Standard (fit on train, transform all): StandardScaler()
# Fit on ALL data (unsupervised preprocessing): {“preprocessing”: StandardScaler(), “fit_on_all”: True}
- classmethod matches(step: Any, operator: Any, keyword: str) bool[source]
Match TransformerMixin objects.