Skip to main content

PairedEffect

Struct PairedEffect 

Source
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: usize

Matched (task, seed) pairs in which both arms produced a real observation.

§unmeasured_pairs: usize

Pairs 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: usize

Pairs the gglib arm scored strictly higher.

§losses: usize

Pairs the raw arm scored strictly higher.

§ties: usize

Pairs 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: f64

Mean 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

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> PairedEffect

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PairedEffect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PairedEffect

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for PairedEffect

Source§

fn eq(&self, other: &PairedEffect) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for PairedEffect

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for PairedEffect

Source§

impl StructuralPartialEq for PairedEffect

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,