map.kohonenDTW: Map data to a supervised or unsupervised SOM

Description Usage Arguments Value Author(s) See Also Examples

View source: R/map.R

Description

Map a data matrix onto a trained SOM.

Usage

1
2
3
## S3 method for class 'kohonenDTW'
map(x, newdata, whatmap = NULL, user.weights = NULL,
                      maxNA.fraction = x$maxNA.fraction, ...)

Arguments

x

An object of class kohonenDTW.

newdata

list of data matrices (numerical) of factors, equal to the data argument of the supersom function. No data.frame objects are allowed.

whatmap, user.weights, maxNA.fraction

parameters that usually will be taken from the x object, but can be supplied by the user as well. Note that it is not possible to change distance functions from the ones used in training the map. See supersom for more information.

...

Currently ignored.

Value

A list with elements

unit.classif

a vector of units that are closest to the objects in the data matrix.

dists

distances of the objects to the closest units. Distance measures are the same ones used in training the map.

whatmap,weights

Values used for these arguments.

Author(s)

Ron Wehrens

See Also

predict.kohonenDTW, supersom

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(wines)
set.seed(7)

training <- sample(nrow(wines), 150)
Xtraining <- scale(wines[training, ])
somnet <- som(Xtraining, somgrid(5, 5, "hexagonal"))

map(somnet,
    scale(wines[-training, ],
          center=attr(Xtraining, "scaled:center"),
          scale=attr(Xtraining, "scaled:scale")))

e-sensing/kohonenDTW documentation built on May 27, 2019, 3:29 p.m.