sTrainology
is supposed to define the train-ology (i.e., the
training environment/parameters). The trainology here refers to the
training algorithm, the training stage, the stage-specific parameters
(alpha type, initial alpha, initial radius, final radius and train
length), and the training neighbor kernel used. It returns an object of
class "sTrain".
sTrainology(sMap, data, algorithm = c("batch", "sequential"), stage = c("rough", "finetune", "complete"), alphaType = c("invert", "linear", "power"), neighKernel = c("gaussian", "bubble", "cutgaussian", "ep", "gamma"))
an object of class "sTrain", a list with following components:
algorithm
: the training algorithm
stage
: the training stage
alphaType
: the alpha type
alphaInitial
: the initial alpha
radiusInitial
: the initial radius
radiusFinal
: the final radius
neighKernel
: the neighbor kernel
call
: the call that produced this result
Training stage-specific parameters:
max(1,ceiling(max(xdim,ydim)/8))
at "rough" or "complete" stage,
and max(1,ceiling(max(xdim,ydim)/32))
at "finetune" stage
max(1,ceiling(r/2))
at
"rough" or "complete" stage, and max(1,ceiling(r/8))
at
"finetune" stage
radiusInitial/4
1
max(1,10 * trainDepth)
max(1,40 * trainDepth)
max(1,50 * trainDepth)
radiusInitial
equals radiusFinal
trainDepth
is the training depth, defined as
nHex/dlen
, i.e., how many hexagons/rectanges are used per the
input data length (here dlen
refers to the number of rows)
# 1) generate an iid normal random matrix of 100x10 data <- matrix( rnorm(100*10,mean=0,sd=1), nrow=100, ncol=10) # 2) from this input matrix, determine nHex=5*sqrt(nrow(data))=50, # but it returns nHex=61, via "sHexGrid(nHex=50)", to make sure a supra-hexagonal grid sTopol <- sTopology(data=data, lattice="hexa", shape="suprahex") # 3) initialise the codebook matrix using "uniform" method sI <- sInitial(data=data, sTopol=sTopol, init="uniform") # 4) define trainology at different stages # 4a) define trainology at "rough" stage sT_rough <- sTrainology(sMap=sI, data=data, stage="rough") # 4b) define trainology at "finetune" stage sT_finetune <- sTrainology(sMap=sI, data=data, stage="finetune") # 4c) define trainology using "complete" stage sT_complete <- sTrainology(sMap=sI, data=data, stage="complete")