View source: R/register_umap.R
| register_umap | R Documentation |
Use uniform manifold approximation and projection (UMAP) to embed the data
on the number line and create a order for seriate().
register_umap()
Registers the method "umap" for seriate(). This method applies
1D UMAP to a data matrix or a distance matrix and extracts the order from
the 1D embedding.
Control parameter n_epochs can be increased to find a better embedding.
The returned seriation permutation vector has an attribute named
embedding containing the umap embedding.
Note: Package umap needs to be installed.
Nothing.
McInnes, L and Healy, J, UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction, ArXiv e-prints 1802.03426, 2018.
umap::umap() in umap.
Other seriation:
register_DendSer(),
register_GA(),
register_optics(),
register_smacof(),
register_tsne(),
registry_for_seriation_methods,
seriate(),
seriate_best()
## Not run:
register_umap()
## distances
get_seriation_method("dist", "umap")
data(SupremeCourt)
d <- as.dist(SupremeCourt)
o <- seriate(d, method = "umap", verbose = TRUE)
pimage(d, o)
# look at the returned embedding and plot it
attr(o[[1]], "configuration")
plot_config(o)
## matrix
get_seriation_method("matrix", "umap")
data("Zoo")
Zoo[,"legs"] <- (Zoo[,"legs"] > 0)
x <- as.matrix(Zoo[,-17])
label <- rownames(Zoo)
class <- Zoo$class
o <- seriate(x, method = "umap", verbose = TRUE)
pimage(x, o)
plot_config(o[[1]], col = class)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.