Learn R Programming

mltools (version 0.3.4)

msle: Mean Square Logarithmic Error

Description

Calculate Mean-Square-Logarithmic Error (Deviation)

Usage

msle(preds = NULL, actuals = NULL, na.rm = FALSE, weights = 1)

Arguments

preds

A vector of prediction values in [0, 1]

actuals

A vector of actuals values in 0, 1, or FALSE, TRUE

na.rm

Should (prediction, actual) pairs with at least one NA value be ignored?

weights

Optional vectors of weights

Details

Calculate Mean-Square-Logarithmic Error (Deviation)

Examples

Run this code
# NOT RUN {
preds <- c(1.0, 2.0, 9.5)
actuals <- c(0.9, 2.1, 10.0)
msle(preds, actuals)

# }

Run the code above in your browser using DataLab