pub struct QualitySignal {
pub evr: f64,
pub certainty: f64,
pub void_distance: f64,
pub gap_confidence: f64,
pub combined: f64,
pub level: ConfidenceLevel,
}Expand description
Confidence assessment for a single query result or point on S².
void_distance is signed: negative = inside category coverage (high
gap_confidence), positive = in a void (low gap_confidence). The
sigmoid gap_confidence = 1 / (1 + exp(sharpness · void_distance))
in Self::compute maps that sign convention onto [0, 1].
Fields§
§evr: f64§certainty: f64§void_distance: f64§gap_confidence: f64§combined: f64evr × certainty × gap_confidence
level: ConfidenceLevelImplementations§
Source§impl QualitySignal
impl QualitySignal
pub fn compute(evr: f64, certainty: f64, void_dist: f64, sharpness: f64) -> Self
Sourcepub fn from_certainty(evr: f64, certainty: f64) -> Self
pub fn from_certainty(evr: f64, certainty: f64) -> Self
Simplified: no void distance available (e.g., raw k-NN results).
With no void-distance signal, certainty stands in for gap
proximity: √certainty is a soft penalty (gentler than the
certainty factor itself), making combined effectively
evr × certainty^1.5. The 0.01 floor keeps a zero-certainty
point from zeroing out combined entirely, so EVR and
certainty differences still order results below the floor.
pub fn passes_threshold(&self, min_combined: f64) -> bool
Trait Implementations§
Source§impl Clone for QualitySignal
impl Clone for QualitySignal
Source§fn clone(&self) -> QualitySignal
fn clone(&self) -> QualitySignal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for QualitySignal
Auto Trait Implementations§
impl Freeze for QualitySignal
impl RefUnwindSafe for QualitySignal
impl Send for QualitySignal
impl Sync for QualitySignal
impl Unpin for QualitySignal
impl UnsafeUnpin for QualitySignal
impl UnwindSafe for QualitySignal
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
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