Passive repeat-reliability reports summarize existing solver observations. They do not run a solver or resample new data. Use them when each row already records a stochastic run, or when rows are pre-aggregated with a count column.
Run-level data should contain one row per observed run:
from repeat_reliability import repeat_reliability_report
report = repeat_reliability_report(
runs,
group_cols=["solver", "budget", "instance"],
response_col="energy",
success_rule="min",
threshold=-42.0,
rtt_factor="runtime_seconds",
iterations="num_reads",
effort_per_iteration="sweeps_per_read",
)Pre-aggregated data should use count_col for the number of identical observations represented by each row. Counts weight successes, trials, and resource-factor averages:
report = repeat_reliability_report(
summarized_runs,
group_cols=["solver", "budget"],
success_col="solved",
count_col="n_runs",
rtt_factor="runtime_seconds",
iterations="num_reads",
effort_per_iteration="sweeps_per_read",
)success_col accepts booleans, 0/1, and common boolean strings such as "true", "false", "yes", "no", "1", and "0". Null or ambiguous values are rejected so string values such as "False" are not accidentally treated as truthy.
Use success_col when the input already contains a pass/fail indicator. Otherwise choose a rule and response columns:
success_rule="min": success meansresponse_col <= threshold.success_rule="max": success meansresponse_col >= threshold.success_rule="absolute": success meansabs(response_col - target_value) <= threshold.success_rule="gap","gap_min", or"gap_max": success means the observed optimality gap is withingap.success_rule="PerfRatio": success means an existing performance-ratio column, selected withperf_ratio_colorresponse_col, is greater than or equal tothreshold.
All success rules are evaluated row by row before aggregation.
The report preserves group_cols and any comparison_cols, followed by reliability metrics:
successes,trials, andsuccess_rate.p_hat: raw empirical success rate,successes / trials.adjusted_p_hat,p_ci_lower, andp_ci_upper: Agresti-Coull adjusted estimate and interval.R_c,R_c_ci_lower, andR_c_ci_upper: target-neutral repeat count fortarget_confidence.- A target-specific repeat-count alias, such as
R99fortarget_confidence=0.99orR95fortarget_confidence=0.95. RTTandCETSintervals.CETSusescets_factor, the count-weighted per-row product ofiterations * effort_per_iteration.- Reliability status columns, including
required_trials,additional_trials_required,reliable, andreliability_status. - Comparison flags, when enabled:
best_point_estimate,ci_overlaps_best, andstatistically_unresolved.
Lower R_c, RTT, and CETS values are better. For probability-like comparison columns, call annotate_reliability_comparisons with objective="max".
stochastic_benchmark.run_RepeatReliability forwards keyword arguments to repeat_reliability_report:
report = benchmark.run_RepeatReliability(
response_col="energy",
success_rule="min",
threshold=-42.0,
rtt_factor="runtime_seconds",
iterations="num_reads",
effort_per_iteration="sweeps_per_read",
)If df is omitted, the wrapper uses the first populated DataFrame among raw_data, bs_results, and interp_results. If group_cols is omitted, it groups by parameter_names + instance_cols.
Reports are flat DataFrames and can be joined to benchmark outputs on the group columns:
joined = recommendations.merge(
report,
on=["solver", "budget", "instance"],
how="left",
)