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 = 1L,
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,
xis 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
Integer [0, Inf): Number of threads.
- features
Optional Character vector: Names of at least 2 distinct feature columns to decompose.
NULLdecomposes all numeric features.
Details
Get more information on the config by running ?Rtsne::Rtsne.
Examples
tSNE_config <- setup_tSNE(k = 3L)
tSNE_config
#> <tSNE DecompositionConfig>
#> k: <int> 3
#> initial_dims: <int> 50
#> perplexity: <nmr> 30.00
#> theta: <nmr> 0.50
#> check_duplicates: <lgc> TRUE
#> pca: <lgc> TRUE
#> partial_pca: <lgc> FALSE
#> max_iter: <int> 1000
#> verbose: <lgc> FALSE
#> is_distance: <lgc> FALSE
#> Y_init: <NUL> NULL
#> pca_center: <lgc> TRUE
#> pca_scale: <lgc> FALSE
#> normalize: <lgc> TRUE
#> stop_lying_iter: <int> 250
#> mom_switch_iter: <int> 250
#> momentum: <nmr> 0.50
#> final_momentum: <nmr> 0.80
#> eta: <nmr> 200.00
#> exaggeration_factor: <nmr> 12.00
#> num_threads: <int> 1