Workflow Automation
Parameter Grid
Count Planned Runs
A batch workflow often expands a few parameter choices into repeated runs.
Program
Play the script to change the number of alpha values and watch the run count update.
parameter_grid.R
level_count <-
alpha <- c(0.1, 0.2, 0.3)[seq_len(level_count)]
beta <- c("small", "large")
grid_size <- length(alpha) * length(beta)
label <- paste("runs", grid_size, sep = ":")
cat(label, "\n", sep = "")
level_count <-
alpha <- c(0.1, 0.2, 0.3)[seq_len(level_count)]
beta <- c("small", "large")
grid_size <- length(alpha) * length(beta)
label <- paste("runs", grid_size, sep = ":")
cat(label, "\n", sep = "")
level_count <-
alpha <- c(0.1, 0.2, 0.3)[seq_len(level_count)]
beta <- c("small", "large")
grid_size <- length(alpha) * length(beta)
label <- paste("runs", grid_size, sep = ":")
cat(label, "\n", sep = "")
parameter vector
Each vector represents one set of choices for repeated runs.
grid size
Multiplying vector lengths counts how many combinations will run.
batch planning
A run-count label checks the workflow before any expensive work starts.