pub struct PairedEffect {
pub pairs: usize,
pub unmeasured_pairs: usize,
pub wins: usize,
pub losses: usize,
pub ties: usize,
pub mean_delta: f64,
pub p_value: Option<f64>,
}Expand description
The paired view of the raw-versus-gglib comparison.
The two real arms run the same seeds on the same tasks, so every
(task, seed) cell is a matched pair — and pairing is what removes the
eval’s identical-arm spread from the comparison. The ceiling experiment
(tune runs #12–#32, ADR 0004’s postscript) resolved a +0.067 effect
through noise wider than that only because it paired per run; the same
data has been sitting in AgenticEvalReport::tasks all along, compared
only as arm means.
Pairs are on TuneTaskResult::tool_match_score — the one graded
per-run quality scalar. Pass/fail flips remain visible per task in
AgenticTaskComparison::pass_counts; folding them in here would double
count, since the match score is most of what decides passed.
Fields§
§pairs: usizeMatched (task, seed) pairs in which both arms produced a real
observation.
unmeasured_pairs: usizePairs both arms ran but at least one side never reached the model — dropped from every number here, and reported so the drop is visible.
wins: usizePairs the gglib arm scored strictly higher.
losses: usizePairs the raw arm scored strictly higher.
ties: usizePairs with identical scores. On a suite where most tasks pass cleanly under both arms this is the largest bucket, and that is information: the arms mostly agree.
mean_delta: f64Mean of gglib − raw over the measured pairs.
p_value: Option<f64>One-sided Wilcoxon signed-rank p for “gglib scores higher”, by normal approximation with tie correction.
None below WILCOXON_MIN_PAIRS non-tied pairs — the approximation
is not trustworthy there, and rendering a statistic the design cannot
support is worse than rendering none (the EffectVerdict rule). At
small counts, read Self::wins against Self::losses instead.
Implementations§
Source§impl PairedEffect
impl PairedEffect
Sourcepub fn from_tasks(tasks: &[AgenticTaskComparison]) -> Option<Self>
pub fn from_tasks(tasks: &[AgenticTaskComparison]) -> Option<Self>
Compute the paired comparison from the per-task drill-down.
None when no (task, seed) pair has both sides measured — a paired
analysis of nothing is not a zero effect.
Sourcepub fn from_paired_runs(
a: &[TuneTaskResult],
b: &[TuneTaskResult],
) -> Option<Self>
pub fn from_paired_runs( a: &[TuneTaskResult], b: &[TuneTaskResult], ) -> Option<Self>
The paired comparison between two runs of the same task list, paired
by task_id — the first argument’s score minus the second’s, so
wins counts pairs the first run took.
Built for the tune apply gate (winner versus incumbent), where the two sides are candidates rather than eval arms. A task present in one run and absent from the other is skipped, not counted: an unpaired task has nothing to compare.
Sourcefn from_deltas(deltas: &[f64], unmeasured_pairs: usize) -> Option<Self>
fn from_deltas(deltas: &[f64], unmeasured_pairs: usize) -> Option<Self>
Aggregate a delta list into the paired record. None on no deltas —
a paired analysis of nothing is not a zero effect.
Trait Implementations§
Source§impl Clone for PairedEffect
impl Clone for PairedEffect
Source§fn clone(&self) -> PairedEffect
fn clone(&self) -> PairedEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PairedEffect
impl Debug for PairedEffect
Source§impl<'de> Deserialize<'de> for PairedEffect
impl<'de> Deserialize<'de> for PairedEffect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PairedEffect
impl PartialEq for PairedEffect
Source§fn eq(&self, other: &PairedEffect) -> bool
fn eq(&self, other: &PairedEffect) -> bool
self and other values to be equal, and is used by ==.