Trait linfa::metrics::MultiTargetRegression
source · pub trait MultiTargetRegression<F: Float, T: AsMultiTargets<Elem = F>>: AsMultiTargets<Elem = F> {
// Provided methods
fn max_error(&self, other: &T) -> Result<Array1<F>> { ... }
fn mean_absolute_error(&self, other: &T) -> Result<Array1<F>> { ... }
fn mean_squared_error(&self, other: &T) -> Result<Array1<F>> { ... }
fn mean_squared_log_error(&self, other: &T) -> Result<Array1<F>> { ... }
fn median_absolute_error(&self, other: &T) -> Result<Array1<F>> { ... }
fn mean_absolute_percentage_error(&self, other: &T) -> Result<Array1<F>> { ... }
fn r2(&self, other: &T) -> Result<Array1<F>> { ... }
fn explained_variance(&self, other: &T) -> Result<Array1<F>> { ... }
}
Expand description
Regression metrices trait for multiple targets.
It is possible to compute the listed mectrics between two 2D arrays.
To compare single-dimensional arrays use SingleTargetRegression
.
Provided Methods§
sourcefn max_error(&self, other: &T) -> Result<Array1<F>>
fn max_error(&self, other: &T) -> Result<Array1<F>>
Maximal error between two continuous variables
sourcefn mean_absolute_error(&self, other: &T) -> Result<Array1<F>>
fn mean_absolute_error(&self, other: &T) -> Result<Array1<F>>
Mean error between two continuous variables
sourcefn mean_squared_error(&self, other: &T) -> Result<Array1<F>>
fn mean_squared_error(&self, other: &T) -> Result<Array1<F>>
Mean squared error between two continuous variables
sourcefn mean_squared_log_error(&self, other: &T) -> Result<Array1<F>>
fn mean_squared_log_error(&self, other: &T) -> Result<Array1<F>>
Mean squared log error between two continuous variables
sourcefn median_absolute_error(&self, other: &T) -> Result<Array1<F>>
fn median_absolute_error(&self, other: &T) -> Result<Array1<F>>
Median absolute error between two continuous variables
sourcefn mean_absolute_percentage_error(&self, other: &T) -> Result<Array1<F>>
fn mean_absolute_percentage_error(&self, other: &T) -> Result<Array1<F>>
Mean absolute percentage error between two continuous variables MAPE = 1/N * SUM(abs((y_hat - y) / y))
sourcefn r2(&self, other: &T) -> Result<Array1<F>>
fn r2(&self, other: &T) -> Result<Array1<F>>
R squared coefficient, is the proportion of the variance in the dependent variable that is predictable from the independent variable
sourcefn explained_variance(&self, other: &T) -> Result<Array1<F>>
fn explained_variance(&self, other: &T) -> Result<Array1<F>>
Same as R-Squared but with biased variance