manifoldMap: Visualize an embedding by plotting with images

Description Usage Arguments Details References See Also Examples

Description

Makes a plot of n images sampled from images, positions at coordinates given by x.

Usage

1
manifoldMap(x, n = nrow(x), images, scale = 1, ...)

Arguments

x

A largeVis object or [N,D] matrix of coordinates.

n

The number of images to sample.

images

The images. A 3-D or 4-D array.

scale

Proportion to scale the images to.

...

Addiitional parameters passed to plot.

Details

The images can be passed in either as a list or a 3- or 4-dimensional array. The first dimension is n.

If the objects in the list are matrix objects, or the array is 3-dimensional, the images will be treated as greyscale. If there is an additional dimension, it must have a length of 3 and be RGB color layers.

References

Andrej Karpapthy. t-SNE Visualization of CNN Codes.

See Also

ggManifoldMap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
load("mnist.Rda")
load("mnistcoordinates.Rda")

flip <- function(x) apply(x,2,rev)
rotate <- function(x) t(flip(x))

mnistimages <- apply(mnist$images,
   MARGIN=1,
   FUN = function(x) as.array(rotate(flip(x))))
mnistimages <- t(mnistimages)
dim(mnistimages) <- c(42000, 28, 28)

manifoldMap(coords,
   1000,
   scale = 0.07,
   mnistimages)

## End(Not run)

elbamos/largeVis documentation built on May 16, 2019, 2:58 a.m.