pub struct RankConfidence {
pub confidence: f64,
pub gap_to_next: f64,
pub stability: RankStability,
}Expand description
Confidence level for a ranking position.
Derived from distribution-free conformal prediction: we compute nonconformity scores (score gaps) and calibrate them against the empirical distribution of all gaps in the result set.
§Invariants
confidenceis in[0.0, 1.0].- A gap of zero always yields
Unstablestability. - Deterministic: same scores → same confidence.
Fields§
§confidence: f64Probability that this item truly belongs at this rank position. Computed as the fraction of score gaps that are smaller than the gap between this item and the next.
gap_to_next: f64Absolute score gap to the next-ranked item (0.0 if last or tied).
stability: RankStabilityStability classification derived from gap analysis.
Trait Implementations§
Source§impl Clone for RankConfidence
impl Clone for RankConfidence
Source§fn clone(&self) -> RankConfidence
fn clone(&self) -> RankConfidence
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 RankConfidence
impl Debug for RankConfidence
Auto Trait Implementations§
impl Freeze for RankConfidence
impl RefUnwindSafe for RankConfidence
impl Send for RankConfidence
impl Sync for RankConfidence
impl Unpin for RankConfidence
impl UnsafeUnpin for RankConfidence
impl UnwindSafe for RankConfidence
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