Learn R Programming

popsom (version 3.0.1)

map.build: Build Map

Description

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

Usage

map.build(data, labels=NULL, xdim = 10, ydim = 5, alpha = 0.6, train = 1000)

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.
ydim
the y-dimension of the map.
alpha
the learning rate, should be a positive non-zero real number.
train
the number of training iterations.

Value

Examples

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

Run the code above in your browser using DataLab