Learn R Programming

Laurae (version 0.0.0.9001)

df_mape: Mean Absolute Percentage Error (MAPE) (computation function, single vector)

Description

This function computes the Mean Absolute Percentage Error loss (MAPE) provided preds and labels, but cannot handle multiclass problems.

Usage

df_mape(preds, labels)

Arguments

preds
The predictions.
labels
The labels.

Value

The Mean Absolute Percentage Error.

Examples

Run this code
library(data.table)

# Regression problem
my_preds <- dnorm(rnorm(n = 9*6*10))
my_labels <- runif(n = 9*6*10)
df_mape(my_preds, my_labels)

Run the code above in your browser using DataLab