pub struct BrierScoreTracker { /* private fields */ }Expand description
Brier score calibration tracker.
Computes Brier score = (1/n) * Σ(p - o)² where p is predicted probability and o is actual outcome (0 or 1). Perfect calibration yields Brier score = 0.
Implementations§
Source§impl BrierScoreTracker
impl BrierScoreTracker
Sourcepub fn record(&mut self, predicted_probability: f64, was_incompatible: bool)
pub fn record(&mut self, predicted_probability: f64, was_incompatible: bool)
Record a prediction and its outcome.
Sourcepub fn brier_score(&self) -> f64
pub fn brier_score(&self) -> f64
Get the current Brier score (0 = perfect, 1 = worst).
Sourcepub fn is_calibrated(&self, threshold: f64) -> bool
pub fn is_calibrated(&self, threshold: f64) -> bool
Check if predictions are well-calibrated (Brier score below threshold).
Sourcepub fn metrics(&self) -> BrierScoreMetrics
pub fn metrics(&self) -> BrierScoreMetrics
Get calibration metrics.
Trait Implementations§
Source§impl Clone for BrierScoreTracker
impl Clone for BrierScoreTracker
Source§impl Debug for BrierScoreTracker
impl Debug for BrierScoreTracker
Auto Trait Implementations§
impl Freeze for BrierScoreTracker
impl RefUnwindSafe for BrierScoreTracker
impl Send for BrierScoreTracker
impl Sync for BrierScoreTracker
impl Unpin for BrierScoreTracker
impl UnsafeUnpin for BrierScoreTracker
impl UnwindSafe for BrierScoreTracker
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