pub struct IpsReport {Show 13 fields
pub n_traces: usize,
pub n_with_propensity: usize,
pub candidate_start_rung: u32,
pub ips_cost: f64,
pub snips_cost: f64,
pub ess: f64,
pub ci_ips_cost: (f64, f64),
pub ips_served_failure: Option<f64>,
pub snips_served_failure: Option<f64>,
pub n_correctness_known: usize,
pub ci_ips_served_failure: Option<(f64, f64)>,
pub dr_cost: f64,
pub ci_dr_cost: (f64, f64),
}Expand description
IPS, SNIPS, and doubly-robust (DR) estimates for evaluating a fixed candidate start-rung policy.
Valid only for traffic logged under a stochastic policy that recorded propensities via
[escalation.exploration]. Traces without a propensity field are excluded and reported
in n_with_propensity.
ponytail: per-context greedy identification is not exploited here (uniform-weight IPS suffices for population-level estimates).
Fields§
§n_traces: usizeTotal traces in the store for this tenant.
n_with_propensity: usizeTraces with propensity: Some(p > 0) — the IPS population.
candidate_start_rung: u32Candidate start rung being evaluated.
ips_cost: f64IPS (Horvitz-Thompson) estimate of mean cost under “always start at rung N”.
snips_cost: f64SNIPS (self-normalised IPS) estimate — lower variance, slightly biased.
ess: f64Effective sample size ESS = (Σwᵢ)² / Σwᵢ².
ci_ips_cost: (f64, f64)Bootstrap 95% CI (2.5/97.5 pct) for the IPS cost estimate.
ips_served_failure: Option<f64>IPS estimate of served-failure rate (traces with deferred feedback on logged rung N).
snips_served_failure: Option<f64>SNIPS estimate of served-failure rate.
n_correctness_known: usizeTraces contributing to the failure-rate IPS estimate.
ci_ips_served_failure: Option<(f64, f64)>Bootstrap 95% CI for the IPS served-failure estimate.
dr_cost: f64Doubly-robust (DR) cost estimate: DM baseline + IPS residual correction.
DRᵢ = DM(xᵢ, N) + wᵢ · (rᵢ − DM(xᵢ, aᵢ)), mean over all propensity traces.
Unbiased when either propensities or the reward model is correctly specified.
ci_dr_cost: (f64, f64)Bootstrap 95% CI (2.5/97.5 pct) for the DR cost estimate.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IpsReport
impl RefUnwindSafe for IpsReport
impl Send for IpsReport
impl Sync for IpsReport
impl Unpin for IpsReport
impl UnsafeUnpin for IpsReport
impl UnwindSafe for IpsReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more