nirs4all.pipeline.dagml.run_paths module

Native dag-ml run paths for the host backend.

One _run_* function per supported pipeline shape — single-variant CV+refit, native param-model generation, repetition (group-aware), rep-fusion reshape, sample-augmentation (global / fold-local), and the separation / by_source / duplication / stacking branch fan-outs. Each assembles the compat or canonical DSL, drives dag-ml-cli through the process adapter, and maps the native bundle.scores into a RunResult.

class nirs4all.pipeline.dagml.run_paths.DuplicationBranchMergeTransformer(branches: list[dict[str, Any]], merge_mode: str = 'features')[source]

Bases: object

Sklearn-compatible fold-local transformer for legacy duplication feature merges.

The native concrete path fits this transformer inside each dag-ml fold. Each branch transform chain is therefore fit only on that fold’s training rows before the downstream estimator sees the concatenated branch feature matrix. For merge_mode="all", branch-local models are also fit after their branch transforms and their prediction columns are appended after all branch feature blocks, matching legacy’s MergeController collection order (features first, predictions second).

fit(X: Any, y: Any = None) → DuplicationBranchMergeTransformer[source]
fit_transform(X: Any, y: Any = None, **fit_params: Any) → ndarray[source]
get_params(deep: bool = True) → dict[str, Any][source]
set_params(**params: Any) → DuplicationBranchMergeTransformer[source]
transform(X: Any) → ndarray[source]
class nirs4all.pipeline.dagml.run_paths.DuplicationFusionEstimator(branches: list[dict[str, Any]], merge_mode: str = 'all')[source]

Bases: RegressorMixin, DuplicationBranchMergeTransformer

Fit branch-local models on one native training pool and average predictions.

predict(X: Any) → ndarray[source]