sPipeline
is supposed to finish ab inito training for the input
data. It returns an object of class "sMap".
sPipeline(data = NULL, xdim = NULL, ydim = NULL, nHex = NULL,
lattice = c("hexa", "rect"), shape = c("suprahex", "sheet"),
init = c("linear", "uniform", "sample"), algorithm = c("batch",
"sequential"), alphaType = c("invert", "linear", "power"),
neighKernel = c("gaussian", "bubble", "cutgaussian", "ep", "gamma"),
finetuneSustain = F, verbose = T)
nHex
: the total number of hexagons/rectanges in the grid
xdim
: x-dimension of the grid
ydim
: y-dimension of the grid
lattice
: the grid lattice
shape
: the grid shape
coord
: a matrix of nHex x 2, with rows corresponding to
the coordinates of all hexagons/rectangles in the 2D map grid
init
: an initialisation method
neighKernel
: the training neighborhood kernel
codebook
: a codebook matrix of nHex x ncol(data), with
rows corresponding to prototype vectors in input high-dimensional
space
hits
: a vector of nHex, each element meaning that a
hexagon/rectangle contains the number of input data vectors being hit
wherein
mqe
: the mean quantization error for the "best" BMH
call
: the call that produced this result
sTopology
, sInitial
,
sTrainology
, sTrainSeq
,
sTrainBatch
, sBMH
,
visHexMulComp
# 1) generate an iid normal random matrix of 100x10
data <- matrix( rnorm(100*10,mean=0,sd=1), nrow=100, ncol=10)
colnames(data) <- paste(rep('S',10), seq(1:10), sep="")
# 2) get trained using by default setup but with different neighborhood kernels
# 2a) with "gaussian" kernel
sMap <- sPipeline(data=data, neighKernel="gaussian")
# 2b) with "bubble" kernel
# sMap <- sPipeline(data=data, neighKernel="bubble")
# 2c) with "cutgaussian" kernel
# sMap <- sPipeline(data=data, neighKernel="cutgaussian")
# 2d) with "ep" kernel
# sMap <- sPipeline(data=data, neighKernel="ep")
# 2e) with "gamma" kernel
# sMap <- sPipeline(data=data, neighKernel="gamma")
# 3) visualise multiple component planes of a supra-hexagonal grid
visHexMulComp(sMap, colormap="jet", ncolors=20, zlim=c(-1,1),
gp=grid::gpar(cex=0.8))
Run the code above in your browser using DataLab