pub struct AbTestRunner { /* private fields */ }Expand description
Runner for A/B testing experiments
Implementations§
Source§impl AbTestRunner
impl AbTestRunner
Sourcepub fn with_alpha(self, alpha: f64) -> Self
pub fn with_alpha(self, alpha: f64) -> Self
Set the significance level (e.g., 0.05 for 95% confidence)
Sourcepub fn compare(
&self,
result_a: &ModelEvalResult,
result_b: &ModelEvalResult,
) -> Result<AbTestResult>
pub fn compare( &self, result_a: &ModelEvalResult, result_b: &ModelEvalResult, ) -> Result<AbTestResult>
Compare two models on the same evaluation metric.
The scores must be paired (same test samples evaluated by both models). If scores have different lengths, only the common prefix is used.
Sourcepub fn rank_models(
&self,
results: &[ModelEvalResult],
) -> Result<Vec<(String, f64, bool)>>
pub fn rank_models( &self, results: &[ModelEvalResult], ) -> Result<Vec<(String, f64, bool)>>
Compare multiple models and produce a ranking by mean score.
Returns a list of (model_id, mean_score, is_significantly_best) tuples, sorted by mean score descending.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AbTestRunner
impl RefUnwindSafe for AbTestRunner
impl Send for AbTestRunner
impl Sync for AbTestRunner
impl Unpin for AbTestRunner
impl UnsafeUnpin for AbTestRunner
impl UnwindSafe for AbTestRunner
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.