absolute_error: Calculate absolute error regression loss.

Description Usage Arguments Value See Also Examples

View source: R/regression_metrics.R

Description

Calculate absolute error regression loss.

Usage

1
absolute_error(y_true, y_pred)

Arguments

y_true

Ground truth (correct) target values.

y_pred

Estimated target values.

Value

A numeric vector of length equal to max(length(y_true), length(y_pred)).

See Also

Other regression.metrics: absolute_percent_error, explained_variance_score, log_error, mean_absolute_error, mean_absolute_percent_error, mean_absolute_scaled_error, mean_error, mean_percent_error, mean_squared_error, mean_squared_log_error, median_absolute_error, median_absolute_percent_error, median_percent_error, median_squared_error, median_squared_log_error, percent_error, r2_score, squared_error, squared_log_error, symmetric_mean_absolute_percent_error, symmetric_median_absolute_percent_error, total_variance_score, unexplained_variance_score

Examples

1
absolute_error(1:10, 10:1)

Example output

 [1] 9 7 5 3 1 1 3 5 7 9

scorer documentation built on May 29, 2017, 4:24 p.m.