There's more...

You can also use the RnavGraph package to visualize high dimensional data (digits in this case) using graphs as a navigational infrastructure. For more information, please refer to http://www.icesi.edu.co/CRAN/web/packages/RnavGraph/vignettes/RnavGraph.pdf.

Here is a description of how you can use RnavGraph to visualize high dimensional data in a graph:

  1. First, install and load the RnavGraph and graph packages:
        > install.packages("RnavGraph")
        > source("http://bioconductor.org/biocLite.R")
        > biocLite("graph")
        > library(RnavGraph)  
  1. You can then create an NG_data object from the digit data:
        > digit.group = rep(c(1:9,0), each = 1100)
        > digit.ng_data = ng_data(name = "ISO_digits",
        + data = data.frame(digit.isomap$points),
        + shortnames = paste('i',1:6, sep = ''),
        + group = digit.group[digit.idx],
        + labels = as.character(digits.group[digit.idx]))
  1. Create an NG_graph object from NG_data:
        >  V = shortnames(digit.ng_data)
        >  G = completegraph(V)
        >  LG =linegraph(G)
        > LGnot = complement(LG)
        > ng.LG = ng_graph(name = "3D Transition", graph = LG)
        > ng.LGnot = ng_graph(name = "4D Transition", graph = LGnot)
  1. Finally, you can visualize the graph in the tk2d plot:
        > ng.i.digits = ng_image_array_gray('USPS Handwritten Digits',
        + digit.select,16,16,invert = TRUE,
        + img_in_row = FALSE)
        > vizDigits1 = ng_2d(data = digit.ng_data, graph = ng.LG, images
= ng.i.digits) > vizDigits2 = ng_2d(data = digit.ng_data, graph = ng.LGnot, images
= ng.i.digits) > nav = navGraph(data = digit.ng_data, graph
= list(ng.LG, ng.LGnot), viz = list(vizDigits1, vizDigits2))
A 3D transition graph plot
  1. One can also view a 4D transition graph plot:
A 4D transition graph plot
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset