precise_umap.Rd
This function will run umap on the output of precise_dist or a list of distance matrices.
precise_umap(data, distance = TRUE, n_neighbors = 15, spread = 1, min_dist = 0.01, bandwidth = 1, type = "ggplot2", color_vec = NULL, colors = NULL, parallel = FALSE, verbose = FALSE)
data | A square, numeric dataframe, matrix or tibble. |
---|---|
verbose | TRUE or FALSE. Should the function tell you what is happening internally? |
max_iter | A positive integer for the number of iterations. See details. |
perplexity | A positive integer that loosely equates to the number of nearest neighboors. See details. |
theta | A positive numeric value between 0-1 that toggles between exact umap and Barnes-Hut umap. See details. |
suffix | A string to be used as the suffix for the output distance name. |
file | NULL or the absolute path to save the results as an RData file. |
cores | An integer value equal to 1 or greater for the number of computer cores to use. |
A list of umap results, which can be viewed with trellis_umap.
toggles between two versions of umap. If theta = 0.0, a modified version of umap
is run,
otherwise if theta > 0.0, umap
is run.
Muchmore, B., Muchmore P. and Alarcón-Riquelme ME. (2018). Optimal Distance Matrix Construction with PreciseDist and PreciseGraph.
library(PreciseDist) test_matrix <- replicate(10, rnorm(100)) test_dists <- test_matrix %>% precise_dist(c("manhattan", "euclidean"))#> [1] "Starting dists calculations at 2018-11-29 15:20:31" #> [1] "Finished dists calculations at 2018-11-29 15:20:32" #> [1] "Calculations took: 0.5 seconds" #> [1] "Starting dist_funcs calculations at 2018-11-29 15:20:32" #> [1] "Finished dist_funcs calculations at 2018-11-29 15:20:32" #> [1] "Calculations took: 0 seconds"test_umap <- test_dists %>% precise_umap(data, file = NULL, max_iter = 1001, perplexity = 15, theta = 0.0, cores = 1, suffix = "", verbose = TRUE)#> Error in precise_umap(., data, file = NULL, max_iter = 1001, perplexity = 15, theta = 0, cores = 1, suffix = "", verbose = TRUE): unused arguments (file = NULL, max_iter = 1001, perplexity = 15, theta = 0, cores = 1, suffix = "")