evaliq | R Documentation |
Calculates Root Mean Squared Error (RMSE), Mean Absolute Error (MAE) and Normalized Root Mean Squared Error (NRMSE). It also performs visualization for imputation quality evaluation.
evaliq(x.true, x.impute, plot = TRUE, interactive = FALSE)
x.true |
a vector with true values. |
x.impute |
a vector with estimated values. |
plot |
a Boolean that indicates whether to plot or not. |
interactive |
a Boolean that indicates whether to use interactive plot when the plot option is invoked (plot = "TRUE"). |
rmse root mean squared error.
mae mean absolute error.
nrmse normalized root mean squared error.
Zhongli Jiang jiang548@purdue.edu
misspi
, missar
# A very quick example
n <- 100
x.true <- rnorm(n)
x.est <- x.true
na.idx <- sample(1:n, 20)
x.est[na.idx] <- x.est[na.idx] + rnorm(length(na.idx), sd = 0.1)
# Default plot
er.eval <- evaliq(x.true[na.idx], x.est[na.idx])
# Interactive plot
er.eval <- evaliq(x.true[na.idx], x.est[na.idx], interactive = TRUE)
# Turn off plot
# All of the three case will return the value of error
er.eval <- evaliq(x.true[na.idx], x.est[na.idx], plot = FALSE)
er.eval
# Real data example
set.seed(0)
data(toxicity, package = "misspi")
toxicity.miss <- missar(toxicity, 0.4, 0.2)
impute.res <- misspi(toxicity.miss)
x.imputed <- impute.res$x.imputed
na.idx <- which(is.na(toxicity.miss))
evaliq(toxicity[na.idx], x.imputed[na.idx])
evaliq(toxicity[na.idx], x.imputed[na.idx], interactive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.