pub struct MetricTracker { /* private fields */ }Expand description
Metric tracker for managing multiple metrics.
Implementations§
Source§impl MetricTracker
impl MetricTracker
Sourcepub fn compute_all(
&mut self,
predictions: &ArrayView<'_, f64, Ix2>,
targets: &ArrayView<'_, f64, Ix2>,
) -> TrainResult<HashMap<String, f64>>
pub fn compute_all( &mut self, predictions: &ArrayView<'_, f64, Ix2>, targets: &ArrayView<'_, f64, Ix2>, ) -> TrainResult<HashMap<String, f64>>
Compute all metrics.
Sourcepub fn get_history(&self, metric_name: &str) -> Option<&Vec<f64>>
pub fn get_history(&self, metric_name: &str) -> Option<&Vec<f64>>
Get history for a specific metric.
Sourcepub fn clear_history(&mut self)
pub fn clear_history(&mut self)
Clear history.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetricTracker
impl !RefUnwindSafe for MetricTracker
impl !Send for MetricTracker
impl !Sync for MetricTracker
impl Unpin for MetricTracker
impl !UnwindSafe for MetricTracker
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> 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