root_mean_squared_error: RMSE and normalized RMSE

View source: R/root_mean_squared_error.R

root_mean_squared_errorR Documentation

RMSE and normalized RMSE

Description

Computes the rmse or normalized rmse (nrmse) between two numeric vectors of the same length representing observations and model predictions.

Usage

root_mean_squared_error(
  o,
  p,
  normalization = c("rmse", "all", "mean", "sd", "maxmin", "iq")
)

Arguments

o

Numeric vector with observations, must have the same length as p.

p

Numeric vector with predictions, must have the same length as o.

normalization

character, normalization method, Default: "rmse" (see Details).

Details

The normalization methods go as follows:

  • "rmse": RMSE with no normalization.

  • "mean": RMSE dividied by the mean of the observations (rmse/mean(o)).

  • "sd": RMSE dividied by the standard deviation of the observations (rmse/sd(o)).

  • "maxmin": RMSE divided by the range of the observations (rmse/(max(o) - min(o))).

  • "⁠iq"⁠: RMSE divided by the interquartile range of the observations (rmse/(quantile(o, 0.75) - quantile(o, 0.25)))

Value

Named numeric vector with either one or 5 values, as selected by the user.

See Also

Other utilities: .vif_to_df(), auc(), beowulf_cluster(), objects_size(), optimization_function(), prepare_importance_spatial(), rescale_vector(), setup_parallel_execution(), standard_error(), statistical_mode(), thinning(), thinning_til_n()

Examples


root_mean_squared_error(
  o = runif(10),
  p = runif(10)
)


spatialRF documentation built on Dec. 20, 2025, 1:07 a.m.