Learn R Programming

multisom (version 1.3)

BatchSOM: Self-Organizing Map: Batch version

Description

This function implements the batch version of the kohonen algorithm

Usage

BatchSOM(data,grid = somgrid(),min.radius=0.0001,
         max.radius=0.002,maxit=1000,
         init=c("random","sample","linear"),
         radius.type=c("gaussian","bubble","cutgauss","ep"))

Arguments

data
data to be used
grid
a grid for the representatives.The numbers of nodes should be approximately equal to 5*sqrt(n), which n denotes the number of sample.
min.radius
the minimum neighbourhood radius
max.radius
the maximum neighbourhood radius
maxit
the maximum number of iterations to be done
init
the method to be used to initialize the prototypes.The following are permitted: "random" uses random draws from N(0,1); "sample" uses a radom sample from the data; "linear" uses the linear grids upon the first two principle components direction.See package som.
radius.type
the neighborhood function type. The following are permitted: "gaussian" "bubble" "cutgauss" "ep"

Value

classif
a vector of integer indicating to which unit each observation has been assigned
codes
a matrix of code vectors
grid
the grid, an object of class "somgrid"

References

Kohonen, T. (1995) Self-Organizing Maps. Springer-Verlag.

Brian Ripley, William Venables (2015), class: Functions for Classification, URL https://cran.r-project.org/package=class.

Jun Yan (2010), som: Self-Organizing Map, URL https://cran.r-project.org/package=som.

Examples

Run this code
data<-iris[,-c(5)]
BatchSOM(data,grid = somgrid(7,7,"hexagonal"),min.radius=0.0001,
              max.radius=0.002,maxit=1000,"random","gaussian")

Run the code above in your browser using DataLab