Description Usage Arguments Value References Examples
Apply the LargeVis algorithm for visualizing large high-dimensional datasets.
1 2 3 4 |
x |
A matrix, where the features are rows and the examples are columns. |
dim |
The number of dimensions in the output |
K |
The number of nearest-neighbors to use in computing the kNN graph |
n_trees |
See |
tree_threshold |
See |
max_iter |
See |
distance_method |
One of "Euclidean" or "Cosine." See |
perplexity |
See |
save_neighbors |
Whether to include in the output the adjacency matrix of nearest neighbors. |
save_edges |
Whether to include in the output the distance matrix of nearest neighbors. |
threads |
The maximum number of threads to spawn. Determined automatically if |
verbose |
Verbosity |
... |
Additional arguments passed to |
A 'largeVis' object with the following slots:
If save_neighbors=TRUE
, An [N,K] 0-indexed integer matrix, which is an adjacency list of each vertex' identified nearest neighbors.
If the algorithm failed to find K
neighbors, the matrix is padded with NA
's. Note that this matrix is not identical to the output
from randomProjectionTreeSearch
: missing neighbors are NA
's rather than -1
's, and the matrix is transposed.
If save_edges=TRUE
, a [N,N] sparse matrix of distances between nearest neighbors.
A sparse [N,N] matrix where each cell represents w_{ij}.
The call.
A [D,N] matrix of the embedding of the dataset in the low-dimensional space.
Jian Tang, Jingzhou Liu, Ming Zhang, Qiaozhu Mei. Visualizing Large-scale and High-dimensional Data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # iris
data(iris)
dat <- as.matrix(iris[,1:4])
visObject <- largeVis(dat, max_iter = 20, K = 10, sgd_batches = 10000, threads = 1)
plot(t(visObject$coords))
## Not run:
# mnist
# Note: The MNIST dataset may be obtained using the deepnet package.
load("./mnist.Rda")
dat <- mnist$images
dim(dat) <- c(42000, 28 * 28)
dat <- (dat / 255) - 0.5
dat <- t(dat)
visObject <- largeVis(dat, n_trees = 50, tree_th = 200, K = 50)
plot(t(visObject$coords))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.