Learn R Programming

MetricsWeighted (version 0.5.4)

medae: Median Absolute Error

Description

Calculates weighted median absolute error of predicted values. The smaller the value, the better.

Usage

medae(actual, predicted, w = NULL, ...)

Value

A numeric vector of length one.

Arguments

actual

Observed values.

predicted

Predicted values.

w

Optional case weights.

...

Further arguments passed to weighted_mean.

Examples

Run this code
medae(1:10, c(2:10, 100))
medae(1:10, c(2:10, 100), w = 1:10)

Run the code above in your browser using DataLab