pub mod classification;
pub mod regression;
pub mod running;
pub use classification::{
Accuracy, BinaryConfusionMatrix, F1Score, MultiClassConfusionMatrix, Precision, Recall,
TopKAccuracy,
};
pub use regression::{
ExplainedVariance, MaxError, MeanAbsoluteError, MeanAbsolutePercentageError, MeanSquaredError,
RSquared, RootMeanSquaredError,
};
pub use running::{
EarlyStopping, ExponentialMovingAverage, MetricLogger, MetricSummary, RunningMean,
RunningMinMax, RunningStd,
};
pub trait Metric: Send + Sync {
type Prediction;
type Target;
type Output;
fn update(&mut self, predictions: &Self::Prediction, targets: &Self::Target);
fn compute(&self) -> Self::Output;
fn reset(&mut self);
fn name(&self) -> &str;
}