#[non_exhaustive]pub struct CalibrationSample {
pub finding_id: String,
pub topic: String,
pub entity_type_gold: String,
pub entity_type_top1: String,
pub top1_score: f32,
pub top1_margin: Option<f32>,
pub top1_correct: bool,
pub gold_in_candidates: bool,
}Expand description
One labeled calibration sample: a stamped finding’s scoring outcome.
Non-exhaustive: samples are produced by collect_topic_samples, not
constructed downstream, and the field set grows as calibration learns
to measure more (this release added the gold/top-1 types) — downstream
crates read fields and must stay compilable across such additions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.finding_id: StringThe stamped finding.
topic: StringThe topic whose candidate set scored this sample.
entity_type_gold: StringThe finding’s stamped (ground-truth) entity type.
entity_type_top1: StringThe entity type the top candidate named.
top1_score: f32The top candidate’s score.
top1_margin: Option<f32>The top candidate’s lead over the second-best; None when the
topic offered no rival candidate. Mirrors assign_tier’s vacuous
margin pass: a no-rival sample satisfies every margin gate.
top1_correct: boolWhether the top candidate names the finding’s stamped entity type.
gold_in_candidates: boolWhether the stamped type appears in the top candidates at all.
Trait Implementations§
Source§impl Clone for CalibrationSample
impl Clone for CalibrationSample
Source§fn clone(&self) -> CalibrationSample
fn clone(&self) -> CalibrationSample
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CalibrationSample
impl Debug for CalibrationSample
Auto Trait Implementations§
impl Freeze for CalibrationSample
impl RefUnwindSafe for CalibrationSample
impl Send for CalibrationSample
impl Sync for CalibrationSample
impl Unpin for CalibrationSample
impl UnsafeUnpin for CalibrationSample
impl UnwindSafe for CalibrationSample
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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>
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