precise_tsne.RdThis function will run tsne on the output of precise_dist or a list of distance matrices.
precise_tsne(data, distance = TRUE, max_iter = 1001, perplexity = 30, theta = 0.5, type = "ggplot2", color_vec = NULL, colors = NULL, parallel = FALSE, verbose = TRUE)
| data | A square, numeric dataframe, matrix or tibble. |
|---|---|
| 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 tsne and Barnes-Hut tsne. See details. |
| verbose | TRUE or FALSE. Should the function tell you what is happening internally? |
| 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 tsne results, which can be viewed with trellis_tsne.
toggles between two versions of tsne. If theta = 0.0, a modified version of tsne is run,
otherwise if theta > 0.0, tsne 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:30" #> [1] "Finished dists calculations at 2018-11-29 15:20:31" #> [1] "Calculations took: 0.51 seconds" #> [1] "Starting dist_funcs calculations at 2018-11-29 15:20:31" #> [1] "Finished dist_funcs calculations at 2018-11-29 15:20:31" #> [1] "Calculations took: 0 seconds"test_tsne <- test_dists %>% precise_tsne(data, file = NULL, max_iter = 1001, perplexity = 15, theta = 0.0, cores = 1, suffix = "", verbose = TRUE)#> Error in precise_tsne(., data, file = NULL, max_iter = 1001, perplexity = 15, theta = 0, cores = 1, suffix = "", verbose = TRUE): unused arguments (file = NULL, cores = 1, suffix = "")