Learn R Programming

popsom (version 4.3.1)

map.embed: Map Embedding Accuracy

Description

Evaluates how well a map models the underlying training data distribution.

Usage

map.embed(map, conf.int = 0.95, verb=FALSE, ks=FALSE)

Arguments

map

an object of type 'map'.

conf.int

the confidence interval of the embedding test (default 95 percent).

verb

a switch controlling the structure of the output value (default=FALSE)

ks

if true uses the Kolmogorov-Smirnov convergence test otherwise a convergence test based on variance and means is performed (default=FALSE)

Value

The embedding accuracy of the map. If the switch verb=TRUE then a vector of the individual feature embedding accuracies are returned.

References

"A Population Based Convergence Criterion for Self-Organizing Maps," Lutz Hamel and Benjamin Ott. Proceeding of the 2012 International Conference on Data Mining (DMIN'12), pp98-104, July 16-19, 2012, Las Vegas Nevada, USA.

Examples

Run this code
# NOT RUN {
data(iris)

## set data frame and labels
df <- subset(iris,select=-Species)
labels <- subset(iris,select=Species)

## build a map
m <- map.build(df, labels, xdim=15, ydim=10, train=1000)

## display the embedding accuracy of the map
map.embed(m)

## display the embedding accuracies of the individual features
data.frame(names(df),map.embed(m,verb=TRUE))
# }

Run the code above in your browser using DataLab