pub trait SingleTargetRegression<F: Float, T: AsSingleTargets<Elem = F>>: AsSingleTargets<Elem = F> {
    // Provided methods
    fn max_error(&self, compare_to: &T) -> Result<F> { ... }
    fn mean_absolute_error(&self, compare_to: &T) -> Result<F> { ... }
    fn mean_squared_error(&self, compare_to: &T) -> Result<F> { ... }
    fn mean_squared_log_error(&self, compare_to: &T) -> Result<F> { ... }
    fn median_absolute_error(&self, compare_to: &T) -> Result<F> { ... }
    fn mean_absolute_percentage_error(&self, compare_to: &T) -> Result<F> { ... }
    fn r2(&self, compare_to: &T) -> Result<F> { ... }
    fn explained_variance(&self, compare_to: &T) -> Result<F> { ... }
}
Expand description

Regression metrices trait for single targets.

It is possible to compute the listed mectrics between two 1D arrays. To compare bi-dimensional arrays use MultiTargetRegression.

Provided Methods§

source

fn max_error(&self, compare_to: &T) -> Result<F>

Maximal error between two continuous variables

source

fn mean_absolute_error(&self, compare_to: &T) -> Result<F>

Mean error between two continuous variables

source

fn mean_squared_error(&self, compare_to: &T) -> Result<F>

Mean squared error between two continuous variables

source

fn mean_squared_log_error(&self, compare_to: &T) -> Result<F>

Mean squared log error between two continuous variables

source

fn median_absolute_error(&self, compare_to: &T) -> Result<F>

Median absolute error between two continuous variables

source

fn mean_absolute_percentage_error(&self, compare_to: &T) -> Result<F>

Mean absolute percentage error between two continuous variables MAPE = 1/N * SUM(abs((y_hat - y) / y))

source

fn r2(&self, compare_to: &T) -> Result<F>

R squared coefficient, is the proportion of the variance in the dependent variable that is predictable from the independent variable

source

fn explained_variance(&self, compare_to: &T) -> Result<F>

Same as R-Squared but with biased variance

Implementations on Foreign Types§

source§

impl<F: Float, D: Data<Elem = F>, T: AsSingleTargets<Elem = F>> SingleTargetRegression<F, T> for ArrayBase<D, Ix1>

Implementors§

source§

impl<F: Float, T: AsSingleTargets<Elem = F>, T2: AsSingleTargets<Elem = F>, D: Data<Elem = F>> SingleTargetRegression<F, T2> for DatasetBase<ArrayBase<D, Ix2>, T>