setup_tSNE: Setup tSNE config.

View source: R/150_DecompositionConfig.R

setup_tSNER Documentation

Setup tSNE config.

Description

Setup tSNE config.

Usage

setup_tSNE(
  k = 2L,
  initial_dims = 50L,
  perplexity = 30,
  theta = 0.5,
  check_duplicates = TRUE,
  pca = TRUE,
  partial_pca = FALSE,
  max_iter = 1000L,
  verbose = getOption("verbose", FALSE),
  is_distance = FALSE,
  Y_init = NULL,
  pca_center = TRUE,
  pca_scale = FALSE,
  normalize = TRUE,
  stop_lying_iter = if (is.null(Y_init)) 250L else 0L,
  mom_switch_iter = if (is.null(Y_init)) 250L else 0L,
  momentum = 0.5,
  final_momentum = 0.8,
  eta = 200,
  exaggeration_factor = 12,
  num_threads = NULL,
  features = NULL
)

Arguments

k

Integer [1, Inf): Number of components.

initial_dims

Integer [1, Inf): Initial dimensions.

perplexity

Numeric [0, Inf): Perplexity.

theta

Numeric [0, 1]: Speed/accuracy trade-off.

check_duplicates

Logical: If TRUE, check for duplicates.

pca

Logical: If TRUE, perform PCA.

partial_pca

Logical: If TRUE, perform partial PCA.

max_iter

Integer [1, Inf): Maximum number of iterations.

verbose

Logical: If TRUE, print messages.

is_distance

Logical: If TRUE, x is a distance matrix.

Y_init

Optional Matrix: Initial Y matrix.

pca_center

Logical: If TRUE, center PCA.

pca_scale

Logical: If TRUE, scale PCA.

normalize

Logical: If TRUE, normalize.

stop_lying_iter

Integer [0, Inf): Stop lying iterations.

mom_switch_iter

Integer [0, Inf): Momentum switch iterations.

momentum

Numeric: Momentum.

final_momentum

Numeric: Final momentum.

eta

Numeric: Eta.

exaggeration_factor

Numeric: Exaggeration factor.

num_threads

Optional Integer: Deprecated and ignored. Threads come from the execution config: set n_workers_algorithm in the execution_config passed to decomp.

features

Optional Character vector: Names of at least 2 distinct feature columns to decompose. NULL decomposes all numeric features.

Details

Get more information on the config by running ?Rtsne::Rtsne.

Value

tSNEConfig object.

Author(s)

EDG

Examples

tSNE_config <- setup_tSNE(k = 3L)
tSNE_config

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.