Skip to contents

Summarize an adaptive state.

Usage

summarize_adaptive(
  state,
  include_starvation = FALSE,
  include_bootstrap = FALSE
)

Arguments

state

Adaptive state.

include_starvation

Logical; append a starvation_diagnostic list-column containing terminal hybrid exhaustion evidence. Default FALSE.

include_bootstrap

Logical; add a bootstrap list-column with policy, version, initialization seed, integrity identities, and saved tree diagnostics. Default FALSE retains the historical summary columns. Legacy sessions report the shuffled policy and no predictive bootstrap digest or diagnostics.

Value

A one-row tibble with columns n_items, steps_attempted, committed_pairs, n_refits, last_stop_decision, and last_stop_reason, plus the optional starvation_diagnostic and bootstrap list-columns.

Details

Returns a compact run-level summary from canonical logs: attempted steps, committed comparisons, refit count, and last stop decision/reason. This is a pure view and does not recompute model quantities. For an ordinary within-set run with N items, mean comparison exposure is 2 * committed_pairs / N. This count includes bootstrap comparisons and excludes invalid attempts. A planned exposure budget B can use the explicit rounding convention floor(B * N / 2); this summary does not enforce budgets or imply connectivity before N - 1 successful bootstrap comparisons.

The optional diagnostic is NULL when no current terminal evidence is available, including sessions saved before this diagnostic was introduced. Otherwise it contains a classification, originating step, committed count, active item-set scope, maximum observations per pair, and a remaining arithmetic capacity upper bound. The bound includes bootstrap history and ignores pairing restrictions; it is not a feasibility forecast. Sparse replay counts only unused allowed edges. The attempt table retains each failed stage's fallback policies, filter counts, pre-exposure hard-filter boundary, admissible candidate count, and bounded-search flag. Counts refer to examined pools; overlapping pools must not be summed. A missing bounded-search flag means its extent was not recorded. Classification distinguishes pair-capacity exhaustion, duplicate-policy exhaustion, exposure/star-cap exhaustion, other or mixed restrictions, unknown evidence, and selection inconsistency (surviving candidates despite starvation). Only zero arithmetic capacity establishes global pair-capacity exhaustion. Other classifications describe observed filter collapse, not proof of global infeasibility. Existing stop reasons and canonical logs are unchanged.

Examples

state <- adaptive_rank_start(c("a", "b", "c"), seed = 1)
summarize_adaptive(state)
#> # A tibble: 1 × 6
#>   n_items steps_attempted committed_pairs n_refits last_stop_decision
#>     <int>           <int>           <int>    <int> <lgl>             
#> 1       3               0               0        0 FALSE             
#> # ℹ 1 more variable: last_stop_reason <chr>