R/nrmse.R

Defines functions nrmse

Documented in nrmse

##
## MissForest - nonparametric missing value imputation for mixed-type data
##
## This R script contains the the function to compute the normalized root mean
## squared error.
##
## Author: D.Stekhoven, stekhoven@stat.math.ethz.ch
##############################################################################

nrmse <- function(ximp, xmis, xtrue){
  mis <- is.na(xmis)
  sqrt(mean((ximp[mis] - xtrue[mis])^{2}) / stats::var(xtrue[mis]))
}

Try the missForest package in your browser

Any scripts or data that you put into this service are public.

missForest documentation built on April 14, 2022, 5:05 p.m.