visNetReorder
is supposed to visualise the multiple graph
colorings reorded within a sheet-shape rectangle grid
visNetReorder(g, data, sReorder, height = 7, margin = rep(0.1, 4), border.color = "#EEEEEE", colormap = c("bwr", "jet", "gbr", "wyr", "br", "yr", "rainbow", "wb"), ncolors = 40, zlim = NULL, colorbar = T, colorbar.fraction = 0.5, newpage = T, glayout = layout.fruchterman.reingold, mtext.side = 3, mtext.adj = 0, mtext.cex = 1, mtext.font = 2, mtext.col = "black", ...)
invisible
none
# 1) generate a random graph according to the ER model g <- erdos.renyi.game(100, 1/100) # 2) produce the induced subgraph only based on the nodes in query subg <- dNetInduce(g, V(g), knn=0) # 3) reorder the module with vertices being color-coded by input data nnodes <- vcount(subg) nsamples <- 10 data <- matrix(runif(nnodes*nsamples), nrow=nnodes, ncol=nsamples) rownames(data) <- V(subg)$name sReorder <- dNetReorder(g=subg, data, feature="node", node.normalise="none")Start at 2018-01-19 12:39:19 First, define topology of a map grid (2018-01-19 12:39:19)... Second, initialise the codebook matrix (36 X 10) using 'linear' initialisation, given a topology and input data (2018-01-19 12:39:19)... Third, get training at the rough stage (2018-01-19 12:39:19)... 1 out of 360 (2018-01-19 12:39:19) 36 out of 360 (2018-01-19 12:39:19) 72 out of 360 (2018-01-19 12:39:19) 108 out of 360 (2018-01-19 12:39:19) 144 out of 360 (2018-01-19 12:39:19) 180 out of 360 (2018-01-19 12:39:19) 216 out of 360 (2018-01-19 12:39:19) 252 out of 360 (2018-01-19 12:39:19) 288 out of 360 (2018-01-19 12:39:19) 324 out of 360 (2018-01-19 12:39:19) 360 out of 360 (2018-01-19 12:39:19) Fourth, get training at the finetune stage (2018-01-19 12:39:19)... 1 out of 1440 (2018-01-19 12:39:19) 144 out of 1440 (2018-01-19 12:39:19) 288 out of 1440 (2018-01-19 12:39:20) 432 out of 1440 (2018-01-19 12:39:20) 576 out of 1440 (2018-01-19 12:39:20) 720 out of 1440 (2018-01-19 12:39:20) 864 out of 1440 (2018-01-19 12:39:20) 1008 out of 1440 (2018-01-19 12:39:20) 1152 out of 1440 (2018-01-19 12:39:20) 1296 out of 1440 (2018-01-19 12:39:20) 1440 out of 1440 (2018-01-19 12:39:20) Next, identify the best-matching hexagon/rectangle for the input data (2018-01-19 12:39:20)... Finally, append the response data (hits and mqe) into the sMap object (2018-01-19 12:39:20)... Below are the summaries of the training results: dimension of input data: 10x10 xy-dimension of map grid: xdim=6, ydim=6, r=3 grid lattice: rect grid shape: sheet dimension of grid coord: 36x2 initialisation method: linear dimension of codebook matrix: 36x10 mean quantization error: 0.232787363343837 Below are the details of trainology: training algorithm: sequential alpha type: invert training neighborhood kernel: gaussian trainlength (x input data length): 36 at rough stage; 144 at finetune stage radius (at rough stage): from 1 to 1 radius (at finetune stage): from 1 to 1 End at 2018-01-19 12:39:20 Runtime in total is: 1 secs# 4) visualise the module with vertices being color-coded by input data visNetReorder(g=subg, colormap="bwr", data=data, sReorder)
visNetReorder.r
visNetReorder.Rd
visNetReorder.pdf
visNet
, dNetReorder