Root mean squared log error
rmsle(x, true_x = mean(Ln(x)))
Arguments
- x
positive numeric vector
- true_x
numeric scalar, target x value, mean(Ln(x))
by default
Value
scalar, root mean of the squared log ratio of observations to target value
Examples
x <- rlnorm(n = 1e5)
rmsle(x) # should be very close to sdlog of lnorm, 1
#> [1] 1.000492
y <- rnorm(n = 5000, mean = 12 )
rmsle(y, true_x = Ln(12))
#> [1] 0.08455757
1/12
#> [1] 0.08333333