What is the supra-hexagonal map?

Notes:
  • All results are based on supraHex (version 1.13.3).
  • R scripts (i.e. R expressions) plus necessary comments are highlighted in light-cyan background, and the rest are outputs in the screen.
  • Images displayed below may be distorted, but should be normal in your screen.
  • Functions contained in supraHex 1.13.3 are hyperlinked in-place and also listed on the right side.
  • Key texts are underlined, in bold and in pumpkin-orange color.
  •       
    # A supra-hexagonal map is a a giant hexagon formed seamlessly by smaller hexagons. This architecture is prevalent in many natural and man-made objects, such as a honeycomb or at Giant's Causeway. It has symmetric beauty around the center, from which individual hexagons radiate outwards. # generate data with an iid matrix of 1000 x 3 data <- matrix(rnorm(1000*3,mean=0,sd=1), nrow=1000, ncol=3) # train a supra-hexagonal map by data sMap <- sPipeline(data, xdim=15)
    Start at 2017-03-27 18:59:32 First, define topology of a map grid (2017-03-27 18:59:32)... Second, initialise the codebook matrix (169 X 3) using 'linear' initialisation, given a topology and input data (2017-03-27 18:59:32)... Third, get training at the rough stage (2017-03-27 18:59:32)... 1 out of 2 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) 2 out of 2 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) Fourth, get training at the finetune stage (2017-03-27 18:59:32)... 1 out of 7 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) 2 out of 7 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) 3 out of 7 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) 4 out of 7 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) 5 out of 7 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) 6 out of 7 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) 7 out of 7 (2017-03-27 18:59:32) updated (2017-03-27 18:59:32) Next, identify the best-matching hexagon/rectangle for the input data (2017-03-27 18:59:32)... Finally, append the response data (hits and mqe) into the sMap object (2017-03-27 18:59:32)... Below are the summaries of the training results: dimension of input data: 1000x3 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: 169x3 mean quantization error: 0.342702855593103 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 2017-03-27 18:59:32 Runtime in total is: 0 secs
    # visualise the supra-hexagonal map with node numbering visHexMapping(sMap, mappingType="indexes") # As you have seen, this architecture has a total of 169 smaller hexagons (ie map nodes) that are indexed as follows: start from the center, and then expand circularly outwards, and for each circle increase in an anti-clockwise order. It is uniquely determined by the x- or y-dimension of the map grid (or its radius r). # There is an inherent relationship between x-dimension (or y-dimension), the radius r and the total number of hexagons nHex: xdim <- sMap$xdim
    r <- (xdim + 1)/2 nHex <- 1 + 6 * r * (r - 1)/2

    Source faq

    FAQ1.r

    Functions used in this FAQ