nirs4all.pipeline.dagml.source_missing module

Explicit missing-source prediction policy shared by live and archive hosts.

nirs4all.pipeline.dagml.source_missing.append_source_presence(predictions: ndarray, presence: ndarray) → ndarray[source]

Append one declared availability feature to one source’s predictions.

nirs4all.pipeline.dagml.source_missing.build_prediction_availability(dataset: Any, identity: Any, sample_ids: list[int], *, target_values: Any, classification: bool) → dict[str, Any][source]

Sign IO masks and encoded class IDs without inventing folds or labels.

nirs4all.pipeline.dagml.source_missing.checked_prediction_features(spec: dict[str, Any], presence: ndarray) → ndarray[source]

Consume native sparse-join features; zero cells are never distributions.

nirs4all.pipeline.dagml.source_missing.checked_source_presence(resolver: Any, sample_ids: list[str], source_index: int, source_name: str, availability: dict[str, Any], *, fold_label: str | None = None, fitting: bool = False) → ndarray[source]

Resolve true IO presence, checking signed Train rows before fitting.

nirs4all.pipeline.dagml.source_missing.checked_target_validity(resolved: dict[str, Any], sample_ids: list[str], availability: dict[str, Any], *, fitting: bool) → ndarray[source]

Verify actual target masks against signed Train authority for fit rows.

nirs4all.pipeline.dagml.source_missing.predict_present_rows(predict: Callable[[Any], Any], block: Any, presence: ndarray, output_width: int) → ndarray[source]

Predict observed rows in original target space; absent rows remain zero.

The callable must include any captured inverse target transform. No encoder or model is called when this source is absent for every requested row.

nirs4all.pipeline.dagml.source_missing.prediction_source_presence_metadata(dataset: Any, sample_ids: list[int]) → dict[str, dict[int, Any]][source]

Declare IO availability before a native Test/PREDICT cohort is signed.