Skip to contents

Root mean squared logarithmic error (RMSLE) is the square root of msle().

Usage

rmsle(obs, pred, na.rm = TRUE)

Arguments

obs

Numeric observation vector.

pred

Numeric prediction vector paired with obs.

na.rm

Logical; remove incomplete pairs?

Value

One numeric value.

Details

$$\mathrm{RMSLE}=\sqrt{\frac{1}{n}\sum_{i=1}^n [\log(1+obs_i)-\log(1+pred_i)]^2}.$$

RMSLE is non-negative and zero is ideal. It has the same non-negative input requirement and log1p convention as msle(), returning NA with a warning when either input contains a negative value. Missing-value handling follows bias().

References

Hodson (2022). See msle().

See also