nirs4all.analysis.playground_dataset module

Extract aligned Playground inputs from an assembled scientific dataset.

The application host selects and authorizes the dataset before calling this module. Extraction preserves source/target choice, physical row identity, metadata and real train/test membership; it never invents missing targets.

class nirs4all.analysis.playground_dataset.PlaygroundDatasetSelection(batch: PreviewBatch, evidence: dict[str, Any], diagnostics: tuple[dict[str, Any], ...] = ())[source]

Bases: object

An extracted preview batch plus auditable selection evidence.

batch: PreviewBatch
diagnostics: tuple[dict[str, Any], ...] = ()
evidence: dict[str, Any]
nirs4all.analysis.playground_dataset.extract_playground_dataset(dataset: Any, *, partition: str = 'all', source_index: int = 0, target_index: int = 0, limits: PreviewLimits | None = None) → PlaygroundDatasetSelection[source]

Extract one source/target without changing scientific row semantics.

nirs4all.analysis.playground_dataset.playground_metadata_columns(dataset: Any, *, partition: str = 'train', max_unique_values: int = 200) → dict[str, Any][source]

Return bounded metadata choices for the existing Playground controls.