maape: Mean Arctangent Absolute Percentage Error

View source: R/metrics.R

maapeR Documentation

Mean Arctangent Absolute Percentage Error

Description

Given the observed and predicted values of numeric data computes the Mean Arctangent Absolute Percentage Error.

Usage

maape(observed, predicted, remove_na = TRUE)

Arguments

observed

(numeric) The observed values. It has to have the same length as predicted.

predicted

(numeric) The observed values. It has to have the same length as observed.

remove_na

(logical(1)) Should NA values be removed?. TRUE by default.

Details

Mean Arctangent Absolute Percentage Error is computed as:

mean(atan(abs(observed - predicted) / abs(observed)))

where y_i is the observed value of element i, haty_i is the predicted value of element i and N is the total number of elements.

Value

A single numeric value with the Mean Arctangent Absolute Percentage Error.

See Also

Other numeric_metrics: mae(), mse(), nrmse(), numeric_summary(), pearson(), r2(), rmse(), spearman()

Examples

## Not run: 
set.seed(1)
x <- rnorm(100)
maape(x, x)
maape(x, x - 1)
maape(x, x + 10)
maape(x, x + 10)
maape(x, x + 10)

## End(Not run)


brandon-mosqueda/SKM documentation built on Feb. 8, 2025, 5:24 p.m.