pub struct CandidateStats {
pub rating_sum: f64,
pub rating_sum_squares: f64,
pub rating_count: usize,
pub model_score: f64,
pub model_variance: f64,
pub wins: usize,
pub losses: usize,
pub ties: usize,
pub times_selected: usize,
pub times_passed: usize,
}Expand description
Statistics tracked for each candidate
Fields§
§rating_sum: f64Sum of all ratings received
rating_sum_squares: f64Sum of squared ratings (for variance calculation)
rating_count: usizeCount of ratings received
model_score: f64Current model-based score (Elo, Bradley-Terry strength, etc.)
model_variance: f64Variance of the model score (for uncertainty quantification)
wins: usizeNumber of wins in pairwise comparisons
losses: usizeNumber of losses in pairwise comparisons
ties: usizeNumber of ties in pairwise comparisons
times_selected: usizeTimes selected in batch selection
times_passed: usizeTimes presented but not selected
Implementations§
Source§impl CandidateStats
impl CandidateStats
Sourcepub fn average_rating(&self) -> Option<f64>
pub fn average_rating(&self) -> Option<f64>
Get the average rating (or None if no ratings)
Sourcepub fn rating_variance(&self) -> Option<f64>
pub fn rating_variance(&self) -> Option<f64>
Get the sample variance of ratings
Sourcepub fn rating_variance_of_mean(&self) -> Option<f64>
pub fn rating_variance_of_mean(&self) -> Option<f64>
Get the variance of the mean (standard error squared)
Sourcepub fn total_comparisons(&self) -> usize
pub fn total_comparisons(&self) -> usize
Get total number of comparisons
Sourcepub fn selection_rate(&self) -> Option<f64>
pub fn selection_rate(&self) -> Option<f64>
Get selection rate (0.0 to 1.0)
Trait Implementations§
Source§impl Clone for CandidateStats
impl Clone for CandidateStats
Source§fn clone(&self) -> CandidateStats
fn clone(&self) -> CandidateStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CandidateStats
impl Debug for CandidateStats
Source§impl Default for CandidateStats
impl Default for CandidateStats
Source§fn default() -> CandidateStats
fn default() -> CandidateStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CandidateStats
impl<'de> Deserialize<'de> for CandidateStats
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CandidateStats
impl RefUnwindSafe for CandidateStats
impl Send for CandidateStats
impl Sync for CandidateStats
impl Unpin for CandidateStats
impl UnsafeUnpin for CandidateStats
impl UnwindSafe for CandidateStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.