Skip to content

boxmot.engine.tuning.analysis_data

Read saved tuning evidence and resolve the parameters actually searched.

LOGGER module-attribute

LOGGER = getLogger(__name__)

NEAR_BEST_DELTA module-attribute

NEAR_BEST_DELTA = 0.2

ParameterSamples dataclass

ParameterSamples(
    name: str,
    kind: str,
    samples: DataFrame,
    bounds: tuple[float, float] | None = None,
    scale: str = "linear",
    options: tuple[Any, ...] = (),
    branch_bounds: dict[str, tuple[float, float]] = dict(),
    branch_options: dict[str, tuple[Any, ...]] = dict(),
)

Finite observations of one active search dimension, retaining trial indices.

bounds class-attribute instance-attribute

bounds: tuple[float, float] | None = None

branch_bounds class-attribute instance-attribute

branch_bounds: dict[str, tuple[float, float]] = field(
    default_factory=dict
)

branch_options class-attribute instance-attribute

branch_options: dict[str, tuple[Any, ...]] = field(
    default_factory=dict
)

kind instance-attribute

kind: str

name instance-attribute

name: str

options class-attribute instance-attribute

options: tuple[Any, ...] = ()

samples instance-attribute

samples: DataFrame

scale class-attribute instance-attribute

scale: str = 'linear'

TrialAnalysis dataclass

TrialAnalysis(
    trials: DataFrame,
    parameters: dict[str, ParameterSamples],
    baseline_index: int,
    baseline_label: str,
    best_index: int,
    near_best: Series,
    sequence_hota: DataFrame,
    notes: list[str],
    chronological: bool,
    schema: dict = dict(),
)

Comparable completed trials and the metadata supporting their diagnostics.

baseline_index instance-attribute

baseline_index: int

baseline_label instance-attribute

baseline_label: str

best_index instance-attribute

best_index: int

chronological instance-attribute

chronological: bool

near_best instance-attribute

near_best: Series

notes instance-attribute

notes: list[str]

parameters instance-attribute

parameters: dict[str, ParameterSamples]

schema class-attribute instance-attribute

schema: dict = field(default_factory=dict)

sequence_hota instance-attribute

sequence_hota: DataFrame

trials instance-attribute

trials: DataFrame

near_best_mask

near_best_mask(scores: Series) -> Series

Select the inclusive HOTA band with tolerance for decimal roundoff.

analyze_parameters

analyze_parameters(
    frame: DataFrame,
    schema: dict,
    *,
    notes: list[str] | None = None,
) -> dict[str, ParameterSamples]

Collect active searchable values; omit fixed metadata and unusable pairs.

Observed constants remain available to summaries, while plot callers can omit them. Only schema-declared Boolean fields accept Boolean coercion.

load_tune_analysis

load_tune_analysis(tune_dir: Path) -> TrialAnalysis | None

Combine saved CSV, search schema and optional final-trial JSON metadata.