View source: R/missing_helpers.R
impute | R Documentation |
Impute values by replacing missing entries with the corresponding assigned prototype entries
impute(object, ...)
object |
a |
... |
unused. |
Imputed matrix as in Cottrell and Letrémy, (2005)
Nathalie Vialaneix nathalie.vialaneix@inrae.fr
Cottrell M., Letrémy P. (2005) Missing values: processing with the Kohonen algorithm. Proceedings of Applied Stochastic Models and Data Analysis (ASMDA 2005), 489-496.
trainSOM
# Run trainSOM algorithm on the iris data with 500 iterations
set.seed(1505)
missings <- cbind(sample(1:150, 50, replace = TRUE),
sample(1:4, 50, replace = TRUE))
x.data <- as.matrix(iris[, 1:4])
x.data[missings] <- NA
iris.som <- trainSOM(x.data = x.data)
iris.som
impute(iris.som)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.