
Wrapper function to generate PaCMAP parameters
Source:R/params-examples.R, R/params-generated.R
params_pacmap.RdWrapper function to generate PaCMAP parameters
Arguments
- n_near
Integer. Near pairs per point (attractive). The kNN search runs
n_near + 50wide and the pairs are the best of those by locally scaled distance. Defaults to10L.- n_mid_near
Integer. Mid-near pairs per point. Each one is the second closest of six random points. Defaults to
5L.- n_further
Integer. Further (random) pairs per point. These exclude the near pairs. Defaults to
20L.- init
String. Embedding initialisation.
"pca"uses the PC scores times0.01, so the ratio between the components survives. One ofc("pca", "random"). Defaults to"pca".- optimiser
String. The optimiser. One of
c("adam_parallel", "adam"). Defaults to"adam_parallel".- lr
Numeric. Adam learning rate. Defaults to
1.0.- n_epochs
Integer or
NULL. Total optimisation epochs. IfNULL, resolved downstream to450. Defaults toNULL.- beta1
Numeric. Adam first moment decay. Defaults to
0.9.- beta2
Numeric. Adam second moment decay. Defaults to
0.999.- eps
Numeric. Adam numerical stability constant. Defaults to
1e-07.- phase1_end
Integer or
NULL. Epoch at which phase 1 ends. IfNULL, resolved downstream to100. Defaults toNULL.- phase2_end
Integer or
NULL. Epoch at which phase 2 ends. IfNULL, resolved downstream to200. Defaults toNULL.
Value
A named list with the following elements:
n_near - Integer. Near pairs per point (attractive). The kNN search runs
n_near + 50wide and the pairs are the best of those by locally scaled distance. Defaults to10L.n_mid_near - Integer. Mid-near pairs per point. Each one is the second closest of six random points. Defaults to
5L.n_further - Integer. Further (random) pairs per point. These exclude the near pairs. Defaults to
20L.init - String. Embedding initialisation.
"pca"uses the PC scores times0.01, so the ratio between the components survives. One ofc("pca", "random"). Defaults to"pca".optimiser - String. The optimiser. One of
c("adam_parallel", "adam"). Defaults to"adam_parallel".lr - Numeric. Adam learning rate. Defaults to
1.0.n_epochs - Integer or
NULL. Total optimisation epochs. IfNULL, resolved downstream to450. Defaults toNULL.beta1 - Numeric. Adam first moment decay. Defaults to
0.9.beta2 - Numeric. Adam second moment decay. Defaults to
0.999.eps - Numeric. Adam numerical stability constant. Defaults to
1e-07.phase1_end - Integer or
NULL. Epoch at which phase 1 ends. IfNULL, resolved downstream to100. Defaults toNULL.phase2_end - Integer or
NULL. Epoch at which phase 2 ends. IfNULL, resolved downstream to200. Defaults toNULL.
Examples
params_pacmap()
#> $n_near
#> [1] 10
#>
#> $n_mid_near
#> [1] 5
#>
#> $n_further
#> [1] 20
#>
#> $init
#> [1] "pca"
#>
#> $optimiser
#> [1] "adam_parallel"
#>
#> $lr
#> [1] 1
#>
#> $n_epochs
#> NULL
#>
#> $beta1
#> [1] 0.9
#>
#> $beta2
#> [1] 0.999
#>
#> $eps
#> [1] 1e-07
#>
#> $phase1_end
#> NULL
#>
#> $phase2_end
#> NULL
#>
params_pacmap(n_near = 15L, n_further = 30L)
#> $n_near
#> [1] 15
#>
#> $n_mid_near
#> [1] 5
#>
#> $n_further
#> [1] 30
#>
#> $init
#> [1] "pca"
#>
#> $optimiser
#> [1] "adam_parallel"
#>
#> $lr
#> [1] 1
#>
#> $n_epochs
#> NULL
#>
#> $beta1
#> [1] 0.9
#>
#> $beta2
#> [1] 0.999
#>
#> $eps
#> [1] 1e-07
#>
#> $phase1_end
#> NULL
#>
#> $phase2_end
#> NULL
#>