pub struct QuestionMetrics {
pub question_id: String,
pub language: Option<String>,
pub risk: Option<String>,
pub total: u64,
pub observed: u64,
pub correct: u64,
pub accuracy: Option<f64>,
pub confusion: BTreeMap<String, BTreeMap<String, u64>>,
pub false_positives: BTreeMap<String, u64>,
pub false_negatives: BTreeMap<String, u64>,
pub acceptance_curve: Vec<AcceptancePoint>,
}Expand description
Metrics for one question and optional language/risk slice.
Fields§
§question_id: StringCaller-owned question identifier.
language: Option<String>Language filter, or None for all languages.
risk: Option<String>Risk filter, or None for all risk levels.
total: u64Labeled cases containing this question.
observed: u64Cases with a valid response.
correct: u64Exact matches with reference answers.
accuracy: Option<f64>Correct share among observed cases; absent when no case was observed.
confusion: BTreeMap<String, BTreeMap<String, u64>>Reference label to selected label counts.
false_positives: BTreeMap<String, u64>False positives by label.
false_negatives: BTreeMap<String, u64>False negatives by label.
acceptance_curve: Vec<AcceptancePoint>Coverage and accepted accuracy at each observed cutoff.
Trait Implementations§
Source§impl Clone for QuestionMetrics
impl Clone for QuestionMetrics
Source§impl Debug for QuestionMetrics
impl Debug for QuestionMetrics
Source§impl<'de> Deserialize<'de> for QuestionMetrics
impl<'de> Deserialize<'de> for QuestionMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QuestionMetrics
impl RefUnwindSafe for QuestionMetrics
impl Send for QuestionMetrics
impl Sync for QuestionMetrics
impl Unpin for QuestionMetrics
impl UnsafeUnpin for QuestionMetrics
impl UnwindSafe for QuestionMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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