
Wrapper function to generate UMAP parameters
Source:R/params-examples.R, R/params-generated.R
params_umap.RdWrapper function to generate UMAP parameters
Arguments
- local_connectivity
Numeric. Number of nearest neighbours assumed to be at distance zero. Defaults to
1.0.- bandwidth
Numeric. Convergence tolerance for smooth kNN distance binary search. Defaults to
1e-05.- mix_weight
Numeric. Balance between fuzzy union and directed graph during symmetrisation. Defaults to
1.0.- lr
Numeric. Learning rate. Defaults to
1.0.- n_epochs
Integer or
NULL. Number of optimisation epochs. IfNULL, resolved downstream based on data size. Defaults toNULL.- neg_sample_rate
Integer. Number of negative samples per positive sample. Defaults to
5L.- gamma
Numeric. Repulsion strength. Defaults to
1.0.- optimiser
String. The optimiser.
"sgd_parallel"is lock-free (Hogwild!) and not reproducible run to run with more than one thread. One ofc("adam_parallel", "sgd", "sgd_parallel", "adam"). Defaults to"adam_parallel".- init
String. Embedding initialisation method. One of
c("spectral", "pca", "random"). Defaults to"spectral".- randomised
Boolean. Use randomised SVD for PCA initialisation. Defaults to
FALSE.
Value
A named list with the following elements:
local_connectivity - Numeric. Number of nearest neighbours assumed to be at distance zero. Defaults to
1.0.bandwidth - Numeric. Convergence tolerance for smooth kNN distance binary search. Defaults to
1e-05.mix_weight - Numeric. Balance between fuzzy union and directed graph during symmetrisation. Defaults to
1.0.lr - Numeric. Learning rate. Defaults to
1.0.n_epochs - Integer or
NULL. Number of optimisation epochs. IfNULL, resolved downstream based on data size. Defaults toNULL.neg_sample_rate - Integer. Number of negative samples per positive sample. Defaults to
5L.gamma - Numeric. Repulsion strength. Defaults to
1.0.optimiser - String. The optimiser.
"sgd_parallel"is lock-free (Hogwild!) and not reproducible run to run with more than one thread. One ofc("adam_parallel", "sgd", "sgd_parallel", "adam"). Defaults to"adam_parallel".init - String. Embedding initialisation method. One of
c("spectral", "pca", "random"). Defaults to"spectral".randomised - Boolean. Use randomised SVD for PCA initialisation. Defaults to
FALSE.
Examples
params_umap()
#> $local_connectivity
#> [1] 1
#>
#> $bandwidth
#> [1] 1e-05
#>
#> $mix_weight
#> [1] 1
#>
#> $lr
#> [1] 1
#>
#> $n_epochs
#> NULL
#>
#> $neg_sample_rate
#> [1] 5
#>
#> $gamma
#> [1] 1
#>
#> $optimiser
#> [1] "adam_parallel"
#>
#> $init
#> [1] "spectral"
#>
#> $randomised
#> [1] FALSE
#>
params_umap(n_epochs = 200L, neg_sample_rate = 10L)
#> $local_connectivity
#> [1] 1
#>
#> $bandwidth
#> [1] 1e-05
#>
#> $mix_weight
#> [1] 1
#>
#> $lr
#> [1] 1
#>
#> $n_epochs
#> [1] 200
#>
#> $neg_sample_rate
#> [1] 10
#>
#> $gamma
#> [1] 1
#>
#> $optimiser
#> [1] "adam_parallel"
#>
#> $init
#> [1] "spectral"
#>
#> $randomised
#> [1] FALSE
#>