nirs4all.pipeline.execution.preprocessing module
Fold-local fitting and replay of learned legacy feature preprocessing.
- class nirs4all.pipeline.execution.preprocessing.FoldPreprocessedModel(model: Any, preprocessing: PreprocessingReplay)[source]
Bases:
objectPersist a model together with its fold’s fitted preprocessing.
- preprocessing: PreprocessingReplay
- class nirs4all.pipeline.execution.preprocessing.FoldPreprocessing(dataset: SpectroDataset, replay: PreprocessingReplay, active: bool = False, unsupported_reason: str | None = None)[source]
Bases:
objectKeep raw features and stage specifications until a fold is fitted.
- classmethod capture(dataset: SpectroDataset, context: ExecutionContext) FoldPreprocessing[source]
- dataset: SpectroDataset
- prepare_fold(dataset: SpectroDataset, model_context: ExecutionContext, train_ids: Any) PreprocessingReplay[source]
- replay: PreprocessingReplay
- class nirs4all.pipeline.execution.preprocessing.PreprocessingReplay(shapes: list[tuple[int, int]], processings: list[list[str]], headers: list[list[str]], units: list[str], context: ~nirs4all.pipeline.config.context.ExecutionContext, input_step: int = 0, steps: list[tuple[int, ~typing.Any]] = <factory>, artifacts: dict[int, list[tuple[str, ~typing.Any]]] = <factory>, source_artifacts: dict[tuple[int, int], list[tuple[str, ~typing.Any]]] = <factory>)[source]
Bases:
objectReplay fitted controllers using feature schemas, without training rows.
- classmethod capture(dataset: SpectroDataset, context: ExecutionContext) PreprocessingReplay[source]
- context: ExecutionContext