luz_metric_mae: Mean absolute error

luz_metric_maeR Documentation

Mean absolute error

Description

Computes the mean absolute error.

Usage

luz_metric_mae()

Value

Returns new luz metric.

See Also

Other luz_metrics: luz_metric_accuracy(), luz_metric_binary_accuracy_with_logits(), luz_metric_binary_accuracy(), luz_metric_binary_auroc(), luz_metric_mse(), luz_metric_multiclass_auroc(), luz_metric_rmse(), luz_metric()

Examples

if (torch::torch_is_installed()) {
library(torch)
metric <- luz_metric_mae()
metric <- metric$new()
metric$update(torch_randn(100), torch_randn(100))
metric$compute()
}

mlverse/luz documentation built on Sept. 19, 2024, 11:20 p.m.