pub struct ScoreAnswer<L: Levels> {
pub probs: L::Map<Probability>,
pub confidence: Confidence,
/* private fields */
}Expand description
The expected score and probability distribution for static levels.
Use this typed result with ScoreQ. Use DynScoreAnswer when level
descriptions were supplied at runtime.
Fields§
§probs: L::Map<Probability>Use the full distribution when expected or nearest level loses detail.
confidence: ConfidenceUse this confidence to decide whether human review is needed.
Implementations§
Source§impl<L: Levels> ScoreAnswer<L>
impl<L: Levels> ScoreAnswer<L>
Sourcepub fn expected(&self) -> f64
pub fn expected(&self) -> f64
Returns the fractional score when preserving model uncertainty matters.
Sourcepub fn nearest(&self) -> L
pub fn nearest(&self) -> L
Returns a level when the fractional Self::expected must be bucketed.
Sourcepub fn argmax(&self) -> L
pub fn argmax(&self) -> L
Returns the most probable level instead of rounding Self::expected.
Trait Implementations§
impl<L: PartialEq + Levels> StructuralPartialEq for ScoreAnswer<L>
Auto Trait Implementations§
impl<L> Forget for ScoreAnswer<L>
impl<L> Freeze for ScoreAnswer<L>
impl<L> Move for ScoreAnswer<L>
impl<L> RefUnwindSafe for ScoreAnswer<L>
impl<L> Send for ScoreAnswer<L>
impl<L> Sync for ScoreAnswer<L>
impl<L> Unpin for ScoreAnswer<L>
impl<L> UnsafeUnpin for ScoreAnswer<L>
impl<L> UnwindSafe for ScoreAnswer<L>
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