
Wrapper function to generate t-SNE parameters
Source:R/params-examples.R, R/params-generated.R
params_tsne.RdWrapper function to generate t-SNE parameters
Usage
params_tsne(
lr = NULL,
n_epochs = 1000L,
early_exag_iter = 250L,
early_exag_factor = 12,
late_exag_factor = NULL,
theta = 0.5,
n_interp_points = 3L,
max_depth = 7L,
init = c("pca", "spectral", "random"),
randomised = TRUE
)Arguments
- lr
Numeric or
NULL. Learning rate. IfNULL, the Rust backend sets it tomax((n_samples / 12), 200), following the N-dependent heuristic of Belkina et al. (2019). Defaults toNULL.- n_epochs
Integer. Number of optimisation epochs. Defaults to
1000L.- early_exag_iter
Integer. Number of early exaggeration iterations. Defaults to
250L.- early_exag_factor
Numeric. Early exaggeration factor. Defaults to
12.0.- late_exag_factor
Numeric or
NULL. Late exaggeration factor, if you wish to use one. Can be useful on large data sets (set it to2.0to4.0). Defaults toNULL.- theta
Numeric. Barnes-Hut approximation angle. Lower values increase accuracy at the cost of speed. Defaults to
0.5.- n_interp_points
Integer. Number of interpolation points per grid cell for FFT acceleration (
"fft"and"fft_3k"). Defaults to3L.- max_depth
Integer. Maximum Barnes-Hut tree depth for the quick-and-dirty optimiser (
"bh_qd"). Smaller is faster and coarser; qdtsne recommends7to10. No effect on the other optimisers. Defaults to7L.- init
String. Embedding initialisation method. One of
c("pca", "spectral", "random"). Defaults to"pca".- randomised
Boolean. Use randomised SVD for PCA initialisation. Defaults to
TRUE.
Value
A named list with the following elements:
lr - Numeric or
NULL. Learning rate. IfNULL, the Rust backend sets it tomax((n_samples / 12), 200), following the N-dependent heuristic of Belkina et al. (2019). Defaults toNULL.n_epochs - Integer. Number of optimisation epochs. Defaults to
1000L.early_exag_iter - Integer. Number of early exaggeration iterations. Defaults to
250L.early_exag_factor - Numeric. Early exaggeration factor. Defaults to
12.0.late_exag_factor - Numeric or
NULL. Late exaggeration factor, if you wish to use one. Can be useful on large data sets (set it to2.0to4.0). Defaults toNULL.theta - Numeric. Barnes-Hut approximation angle. Lower values increase accuracy at the cost of speed. Defaults to
0.5.n_interp_points - Integer. Number of interpolation points per grid cell for FFT acceleration (
"fft"and"fft_3k"). Defaults to3L.max_depth - Integer. Maximum Barnes-Hut tree depth for the quick-and-dirty optimiser (
"bh_qd"). Smaller is faster and coarser; qdtsne recommends7to10. No effect on the other optimisers. Defaults to7L.init - String. Embedding initialisation method. One of
c("pca", "spectral", "random"). Defaults to"pca".randomised - Boolean. Use randomised SVD for PCA initialisation. Defaults to
TRUE.
Examples
params_tsne()
#> $lr
#> NULL
#>
#> $n_epochs
#> [1] 1000
#>
#> $early_exag_iter
#> [1] 250
#>
#> $early_exag_factor
#> [1] 12
#>
#> $late_exag_factor
#> NULL
#>
#> $theta
#> [1] 0.5
#>
#> $n_interp_points
#> [1] 3
#>
#> $max_depth
#> [1] 7
#>
#> $init
#> [1] "pca"
#>
#> $randomised
#> [1] TRUE
#>
params_tsne(n_epochs = 500L, theta = 0.8)
#> $lr
#> NULL
#>
#> $n_epochs
#> [1] 500
#>
#> $early_exag_iter
#> [1] 250
#>
#> $early_exag_factor
#> [1] 12
#>
#> $late_exag_factor
#> NULL
#>
#> $theta
#> [1] 0.8
#>
#> $n_interp_points
#> [1] 3
#>
#> $max_depth
#> [1] 7
#>
#> $init
#> [1] "pca"
#>
#> $randomised
#> [1] TRUE
#>