Resolves batch size and initial step size from the fitted scaling laws of
the e-means paper, exactly as emeans() does.
Usage
emeans_recipe(
n,
k,
d,
nepochs = 5,
batch_law = c("auto", "throughput", "quality"),
batch_size = NULL,
alpha0 = NULL,
unused_threshold = NULL
)Arguments
- n
Number of training rows.
- k
Number of clusters.
- d
Dimension (selects the
"auto"batch law and revival default).- nepochs
Epoch budget; fractions allowed.
- batch_law
"auto"(quality law whend <= 16, else throughput),"throughput", or"quality"(batch about 8 times smaller).- batch_size, alpha0
Optional overrides. Giving
batch_sizealone keeps the step law foralpha0.- unused_threshold
Revival threshold tau: clusters with mass below
tau * mean(mass)are revived.NULLgives 0.1, or 0 (off) whend <= 2.
Value
A list with batch_size, alpha0, epoch_rows, epoch_steps,
total_steps, batch_law, and unused_threshold.
Examples
emeans_recipe(n = 1e6, k = 1024, d = 128, nepochs = 3)
#> $batch_size
#> [1] 32768
#>
#> $alpha0
#> [1] 0.6955212
#>
#> $epoch_rows
#> [1] 1e+06 1e+06 1e+06
#>
#> $epoch_steps
#> [1] 31 31 31
#>
#> $total_steps
#> [1] 93
#>
#> $batch_law
#> [1] "throughput"
#>
#> $unused_threshold
#> [1] 0.1
#>
#> $nepochs
#> [1] 3
#>
