Dimensionality reduction through t-SNE
A multi-assay experiment object
The taxon level used for organisms
A condition to color data points by e.g. "AGE"
A condition to shape data points by e.g. "SEX"
Plot dimensions e.g. c("2D","3D")
The number of dimensions to use in reduction method
Optimal number of neighbors
Datatype to use e.g. c("logcpm", "relabu", "counts")
Pass the cached data back into the function
A list with a plotly object and cached data
data_dir <- system.file("extdata/MAE.rds", package = "animalcules")
toy_data <- readRDS(data_dir)
results <- dimred_tsne(toy_data,
tax_level = "phylum",
color = "AGE",
shape = "GROUP",
k = "3D",
initial_dims = 30,
perplexity = 10,
datatype = "logcpm"
)
#> sigma summary: Min. : 0.512599065767779 |1st Qu. : 0.633512978585265 |Median : 0.689297219210298 |Mean : 0.693244142454956 |3rd Qu. : 0.746970619913928 |Max. : 0.912172075133477 |
#> Epoch: Iteration #100 error is: 18.294138775534
#> Epoch: Iteration #200 error is: 1.50141165424373
#> Epoch: Iteration #300 error is: 0.952060563224696
#> Epoch: Iteration #400 error is: 0.677114080350808
#> Epoch: Iteration #500 error is: 0.480387181059822
#> Epoch: Iteration #600 error is: 0.32605649795734
#> Epoch: Iteration #700 error is: 0.310817256441691
#> Epoch: Iteration #800 error is: 0.295704207004553
#> Epoch: Iteration #900 error is: 0.282002218304907
#> Epoch: Iteration #1000 error is: 0.250345074714285
results$plot