visHexMapping
is supposed to visualise various mapping items
within a supra-hexagonal grid
visHexMapping(sObj, mappingType = c("indexes", "hits", "dist", "antidist", "bases", "customized"), labels = NULL, height = 7, margin = rep(0.1, 4), area.size = 1, gp = grid::gpar(cex = 0.7, font = 1, col = "black"), border.color = NULL, fill.color = "transparent", lty = 1, lwd = 1, lineend = "round", linejoin = "round", clip = c("on", "inherit", "off"), newpage = TRUE)
invisible
The mappingType includes:
# 1) generate data with an iid matrix of 1000 x 9 data <- cbind(matrix(rnorm(1000*3,mean=0,sd=1), nrow=1000, ncol=3), matrix(rnorm(1000*3,mean=0.5,sd=1), nrow=1000, ncol=3), matrix(rnorm(1000*3,mean=-0.5,sd=1), nrow=1000, ncol=3)) colnames(data) <- c("S1","S1","S1","S2","S2","S2","S3","S3","S3") # 2) sMap resulted from using by default setup sMap <- sPipeline(data=data)Start at 2018-01-18 16:56:29 First, define topology of a map grid (2018-01-18 16:56:29)... Second, initialise the codebook matrix (169 X 9) using 'linear' initialisation, given a topology and input data (2018-01-18 16:56:29)... Third, get training at the rough stage (2018-01-18 16:56:29)... 1 out of 2 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) 2 out of 2 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) Fourth, get training at the finetune stage (2018-01-18 16:56:29)... 1 out of 7 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) 2 out of 7 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) 3 out of 7 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) 4 out of 7 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) 5 out of 7 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) 6 out of 7 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) 7 out of 7 (2018-01-18 16:56:29) updated (2018-01-18 16:56:29) Next, identify the best-matching hexagon/rectangle for the input data (2018-01-18 16:56:29)... Finally, append the response data (hits and mqe) into the sMap object (2018-01-18 16:56:29)... Below are the summaries of the training results: dimension of input data: 1000x9 xy-dimension of map grid: xdim=15, ydim=15, r=8 grid lattice: hexa grid shape: suprahex dimension of grid coord: 169x2 initialisation method: linear dimension of codebook matrix: 169x9 mean quantization error: 4.27891105682274 Below are the details of trainology: training algorithm: batch alpha type: invert training neighborhood kernel: gaussian trainlength (x input data length): 2 at rough stage; 7 at finetune stage radius (at rough stage): from 4 to 1 radius (at finetune stage): from 1 to 1 End at 2018-01-18 16:56:29 Runtime in total is: 0 secs# 3) visualise supported mapping items within a supra-hexagonal grid # 3a) for indexes of hexagons visHexMapping(sMap, mappingType="indexes", fill.color="transparent") # 3b) for the number of input data vectors hitting the hexagons visHexMapping(sMap, mappingType="hits", fill.color=NULL) # 3c) for distance (in high-dimensional input space) to neighbors (defined in 2D output space) visHexMapping(sMap, mappingType="dist") # 3d) for clusters/bases partitioned from the sMap visHexMapping(sMap, mappingType="bases")
visHexMapping.r
visHexMapping.Rd
visHexMapping.pdf
sDmat
, sDmatCluster
,
visHexGrid