Convenience functions for calculating loss. These can be passed as arguments to learners that support custom loss functions.
mse(x, y, na.rm = TRUE)msew(x, y, weights = rep(1, length(y)), na.rm = TRUE)
rmse(x, y, na.rm = TRUE)
mae(x, y, na.rm = TRUE)
Vector of True values
Vector of Estimated values
Logical: If TRUE, remove NA values before computation. Default = TRUE
Float, vector: Case weights