pub struct DynScoreAnswer {
pub probs: Vec<Probability>,
pub legend: Vec<String>,
pub confidence: Confidence,
/* private fields */
}Expand description
The expected score and probability distribution for dynamic levels.
Use this with DynScoreQ and runtime crate::DynLevels. Use
ScoreAnswer when an enum defines the levels.
Fields§
§probs: Vec<Probability>Use this distribution with Self::legend to inspect every level.
legend: Vec<String>Use these descriptions to label Self::probs and returned indexes.
confidence: ConfidenceUse this confidence to decide whether human review is needed.
Implementations§
Source§impl DynScoreAnswer
impl DynScoreAnswer
Sourcepub fn expected(&self) -> f64
pub fn expected(&self) -> f64
Returns the fractional score when preserving model uncertainty matters.
Sourcepub fn nearest(&self) -> usize
pub fn nearest(&self) -> usize
Returns an index when the fractional Self::expected must be bucketed.
Sourcepub fn argmax(&self) -> usize
pub fn argmax(&self) -> usize
Returns the most probable index instead of rounding Self::expected.
Trait Implementations§
Source§impl Clone for DynScoreAnswer
impl Clone for DynScoreAnswer
Source§fn clone(&self) -> DynScoreAnswer
fn clone(&self) -> DynScoreAnswer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DynScoreAnswer
impl Debug for DynScoreAnswer
Source§impl PartialEq for DynScoreAnswer
impl PartialEq for DynScoreAnswer
impl StructuralPartialEq for DynScoreAnswer
Auto Trait Implementations§
impl Forget for DynScoreAnswer
impl Freeze for DynScoreAnswer
impl Move for DynScoreAnswer
impl RefUnwindSafe for DynScoreAnswer
impl Send for DynScoreAnswer
impl Sync for DynScoreAnswer
impl Unpin for DynScoreAnswer
impl UnsafeUnpin for DynScoreAnswer
impl UnwindSafe for DynScoreAnswer
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