map.build: Build Map

Description Usage Arguments Value Note Note Author(s) Examples

Description

Constructs a SOM, returns an object of class 'map'.

Usage

1
map.build(data,labels=NULL,xdim=10,ydim=5,alpha=0.3,train=1000,algorithm="vsom")

Arguments

data

a dataframe where each row contains an unlabeled training instance.

labels

a vector or dataframe with one label for each observation in data.

xdim

the x-dimension of the map. (default=10)

ydim

the y-dimension of the map. (default=5)

alpha

the learning rate, should be a positive non-zero real number. (default=0.3)

train

the number of training iterations. (default=1000)

algorithm

training algorithm selection switch. (default="vsom")

Value

object of type 'map'.

Note

You have a choice of training algorithms:

Note

If your training data does not have any labels you can construct a simple label vector as follows: labels <- 1:nrow(training.data). If you let the labels default to the NULL value then no labels will be shown in the map visualization.

Author(s)

Lutz Hamel, Benjamin Ott, Gregory Breard

Examples

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

lutzhamel/popsom2 documentation built on May 25, 2020, 12:46 a.m.