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