Learn R Programming

multisom (version 1.3)

multisom.stochastic: Multisom for stochastic version

Description

This function implements the stochastic version of MultiSOM algorithm.

Usage

multisom.stochastic(data = NULL, xheight = 7, xwidth = 7,
                  topo = c("rectangular", "hexagonal"),
                  neighbouhood.fct =c("bubble","gaussian"),
                  dist.fcts = NULL, rlen = 100,alpha = c(0.05, 0.01),
                  radius = c(2, 1.5, 1.2, 1), index = "all")

Arguments

data
the data matrix of observations
xheight
the x-dimension of the map
xwidth
the y-dimension of the map
topo
the topology used to build the grid.The following are permitted: "hexagonal" "rectangular"
neighbouhood.fct
the neighbouhood function type. The following are permitted: "gaussian" "bubble"
dist.fcts
The metric used to determine the distance function. Possible choices are: "sumofsquares" "euclidean" "manhattan" "tanimoto"
rlen
the maximum number of iterations to be done
alpha
learning rate, a vector of two numbers indicating the amount of change. Default is to decline linearly from 0.05 to 0.01 over rlen updates.
radius
the radius of the neighbourhood, either given as a single number or a vector (start, stop). If it is given as a single number the radius will run from the given number to the negative value of that number; as soon as the neighbourhood gets smaller than one only the winning unit will be updated.
index
vector of the index to be calculated. This should be one of : "db", "dunn", "silhouette", "ptbiserial", "ch", "cindex", "ratkowsky", "mcclain", "gamma", "gplus", "tau", "ccc", "scott", "marriot", "trcovw", "tracew", "friedman", "rubin", "ball", "sdbw", "dindex", "hubert", "sv", "xie-beni", "hartigan", "ssi", "xu", "rayturi", "pbm", "banfeld", "all" (all indices will be used)

Value

All.index.by.layer
Values of indices for each layer.
Best.nc
Best number of clusters proposed by each index and the corresponding index value.
Best.partition
Partition that corresponds to the best number of clusters

Examples

Run this code
## A real data example

data<-as.matrix(iris[,-c(5)])

res<-multisom.stochastic(data, xheight = 8, xwidth = 8,"hexagonal","gaussian",
                    dist.fcts = NULL, rlen = 100,alpha = c(0.05, 0.01),
                    radius = c(2, 1.5, 1.2, 1),c("db","ratkowsky","dunn"))

res$All.index.by.layer
res$Best.nc

Run the code above in your browser using DataLab