Description Usage Arguments Details References See Also Examples
Makes a plot of n
images sampled from images
, positions at coordinates given by x
.
1 | manifoldMap(x, n = nrow(x), images, scale = 1, ...)
|
x |
A |
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 |
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.
Andrej Karpapthy. t-SNE Visualization of CNN Codes.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.