calculate_tsne {immunaut} | R Documentation |
Perform t-Distributed Stochastic Neighbor Embedding (t-SNE)
Description
The calculate_tsne
function reduces high-dimensional data into a 2-dimensional space using
t-SNE for visualization and analysis. This function dynamically adjusts t-SNE parameters
based on the characteristics of the dataset, ensuring robust handling of edge cases.
It also performs data validation, such as checking for sufficient data, removing zero variance
columns, and adjusting perplexity for optimal performance.
Usage
calculate_tsne(dataset, settings, removeGroups = TRUE)
Arguments
dataset |
A data frame or matrix containing the dataset to be processed. Must contain numeric columns. |
settings |
A list of settings for t-SNE, which may include |
removeGroups |
Logical, indicating whether to remove grouping variables before performing t-SNE. Default is TRUE. |
Value
A list containing:
-
info.norm
: The dataset with the t-SNE coordinates (tsne1
,tsne2
) added. -
tsne.norm
: The output from theRtsne
function. -
tsne_columns
: The names of the t-SNE columns used. -
initial_dims
: The number of dimensions used in the initial PCA step. -
perplexity
: The perplexity parameter used. -
exaggeration_factor
: The exaggeration factor used. -
max_iter
: The number of iterations used. -
theta
: The Barnes-Hut approximation parameter used. -
eta
: The learning rate used.