Learn R Programming

SOMbrero (version 1.4-2)

impute: Impute values from prototype information

Description

Impute values by replacing missing entries with the corresponding assigned prototype entries

Usage

impute(object, ...)

Value

Imputed matrix as in Cottrell and Letrémy, (2005)

Arguments

object

a somRes object.

...

unused.

Author

Nathalie Vialaneix nathalie.vialaneix@inrae.fr

References

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.

See Also

trainSOM

Examples

Run this code
# 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)

Run the code above in your browser using DataLab