pub enum AnswerValue {
Noul {
p_true: f32,
},
Choice {
probabilities: Vec<f32>,
},
Score {
probabilities: Vec<f32>,
},
}Expand description
A typed answer payload: one probability distribution over the question’s labels.
Variants§
Noul
Noul: P(true). Emitted as the 2-wide distribution [1 − p, p] over labels
["false", "true"].
Choice
Choice: one probability per option, aligned with canonical option order.
Fields
Score
Score: one probability per level, in ascending level order.
Implementations§
Source§impl AnswerValue
impl AnswerValue
Sourcepub fn probabilities(&self) -> Vec<f32>
pub fn probabilities(&self) -> Vec<f32>
The distribution over the question’s labels, in canonical label order.
Trait Implementations§
Source§impl Clone for AnswerValue
impl Clone for AnswerValue
Source§fn clone(&self) -> AnswerValue
fn clone(&self) -> AnswerValue
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 AnswerValue
impl Debug for AnswerValue
Source§impl PartialEq for AnswerValue
impl PartialEq for AnswerValue
Source§fn eq(&self, other: &AnswerValue) -> bool
fn eq(&self, other: &AnswerValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AnswerValue
Auto Trait Implementations§
impl Freeze for AnswerValue
impl RefUnwindSafe for AnswerValue
impl Send for AnswerValue
impl Sync for AnswerValue
impl Unpin for AnswerValue
impl UnsafeUnpin for AnswerValue
impl UnwindSafe for AnswerValue
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