pub struct CalibrationTracker {
pub config: CalibrationConfig,
/* private fields */
}Expand description
Calibration tracker
Fields§
§config: CalibrationConfigImplementations§
Source§impl CalibrationTracker
impl CalibrationTracker
pub fn new() -> Self
pub fn with_config(config: CalibrationConfig) -> Self
Sourcepub fn record(&mut self, prediction: Prediction)
pub fn record(&mut self, prediction: Prediction)
Record a prediction
Sourcepub fn record_batch(&mut self, predictions: Vec<Prediction>)
pub fn record_batch(&mut self, predictions: Vec<Prediction>)
Record multiple predictions
Sourcepub fn brier_score(&self) -> f32
pub fn brier_score(&self) -> f32
Compute Brier score
Sourcepub fn avg_confidence(&self) -> f32
pub fn avg_confidence(&self) -> f32
Average confidence
Sourcepub fn generate_report(&self) -> CalibrationReport
pub fn generate_report(&self) -> CalibrationReport
Generate full calibration report
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CalibrationTracker
impl RefUnwindSafe for CalibrationTracker
impl Send for CalibrationTracker
impl Sync for CalibrationTracker
impl Unpin for CalibrationTracker
impl UnwindSafe for CalibrationTracker
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> 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