Skip to contents

Compute MAE and MSE, given predictions and true targets. Outputs columnwise average.

Usage

evaluate_linear(y_true, y_pred, label_names = NULL)

Arguments

y_true

Matrix of true labels.

y_pred

Matrix of predictions.

label_names

Names of corresponding labels. Length must be equal to number of columns of y.

Value

A list of evaluation results.

Examples

if (FALSE) { # reticulate::py_module_available("tensorflow")
y_true <- matrix(rnorm(n = 12), ncol = 3)
y_pred <- matrix(rnorm(n = 12), ncol = 3)
evaluate_linear(y_true, y_pred)
}