Learn R Programming

popsom (version 4.3.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.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'.

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)
# }

Run the code above in your browser using DataLab