SMAPE: SMAPE Function

Description Usage Arguments Value Examples

View source: R/functions_measures.R

Description

This function allows you to calculate Symmetric Mean Absolute Percentage Error (SMAPE)

Usage

1
SMAPE(actual, pred, overadj = T)

Arguments

actual

Actual value

pred

Predicted value

overadj

Logical variable. Default is True. It will adjust MAPE to 100 if it is >100

Value

SMAPE value

Examples

1
2
3
data(mtcars)
reg <- lm(mpg ~ ., data = mtcars)
SMAPE(actual = mtcars$mpg,pred=reg$fitted.values)

Somenath24/RegrMetrics documentation built on May 17, 2019, 6:34 p.m.