This function will

plotly_embed(source = "https://pbs.twimg.com/media/Bk-if_XCIAASAQI.jpg",
  xref = "paper", yref = "paper", x = 0.5, y = 0.5, sizex = 1,
  sizey = 1, opacity = 1, sizing = "contain", xanchor = "center",
  yanchor = "middle")

Arguments

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 t-SNE and Barnes-Hut t-SNE. 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.

verbose

TRUE or FALSE. Should the function tell you what is happening internally?

Value

A list of t-SNE results, which can be viewed with trellis_tsne.

References

Muchmore, B., Muchmore P. and Alarcón-Riquelme ME. (2018). Optimal Distance Matrix Construction with PreciseDist and PreciseGraph.

Examples

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:08" #> [1] "Finished dists calculations at 2018-11-29 15:20:09" #> [1] "Calculations took: 0.89 seconds" #> [1] "Starting dist_funcs calculations at 2018-11-29 15:20:09" #> [1] "Finished dist_funcs calculations at 2018-11-29 15:20:09" #> [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 = "")