#[non_exhaustive]pub struct ScoreAnswer {
pub score: f64,
pub confidence: f64,
pub legend: BTreeMap<u32, Content>,
pub probabilities: BTreeMap<u32, f64>,
}Expand description
The answer to a Score: a position on the question’s scale.
Levels are numbered from 0 in the order of the question’s criteria. On the wire the keys of
legend and probabilities are those numbers as strings; here they are numbers, in order.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.score: f64The probability-weighted average of the levels. It can fall between two levels.
confidence: f64How certain the model is of the score, from 0 to 1, derived from probabilities.
legend: BTreeMap<u32, Content>Each level and the description the question gave it.
probabilities: BTreeMap<u32, f64>Each level and its probability. They sum to about 1.
Implementations§
Trait Implementations§
Source§impl Clone for ScoreAnswer
impl Clone for ScoreAnswer
Source§impl Debug for ScoreAnswer
impl Debug for ScoreAnswer
Source§impl PartialEq for ScoreAnswer
impl PartialEq for ScoreAnswer
Source§impl Serialize for ScoreAnswer
impl Serialize for ScoreAnswer
impl StructuralPartialEq for ScoreAnswer
Auto Trait Implementations§
impl Freeze for ScoreAnswer
impl RefUnwindSafe for ScoreAnswer
impl Send for ScoreAnswer
impl Sync for ScoreAnswer
impl Unpin for ScoreAnswer
impl UnsafeUnpin for ScoreAnswer
impl UnwindSafe for ScoreAnswer
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