pub trait Metrics<T> {
// Required methods
fn new() -> Self
where Self: Sized;
fn new_with(_parameter: f64) -> Self
where Self: Sized;
fn get_score(
&self,
y_true: &dyn ArrayView1<T>,
y_pred: &dyn ArrayView1<T>,
) -> f64;
}Expand description
A trait to be implemented by all metrics
Required Methods§
Sourcefn new() -> Selfwhere
Self: Sized,
fn new() -> Selfwhere
Self: Sized,
instantiate a new Metrics trait-object https://doc.rust-lang.org/error-index.html#E0038
Sourcefn new_with(_parameter: f64) -> Selfwhere
Self: Sized,
fn new_with(_parameter: f64) -> Selfwhere
Self: Sized,
used to instantiate metric with a paramenter
Sourcefn get_score(
&self,
y_true: &dyn ArrayView1<T>,
y_pred: &dyn ArrayView1<T>,
) -> f64
fn get_score( &self, y_true: &dyn ArrayView1<T>, y_pred: &dyn ArrayView1<T>, ) -> f64
compute score realated to this metric