impute: Impute values from prototype information

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/missing_helpers.R

Description

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

Usage

1
impute(object, ...)

Arguments

object

a somRes object.

...

unused.

Value

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

Author(s)

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

1
2
3
4
5
6
7
8
9
# 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)

SOMbrero documentation built on Jan. 4, 2022, 1:07 a.m.