GSDTuneJob
GSDTuneJob
Details
R6 class representing a dependency-aware tuning job for group sequential
designs created by gsDesign::gsDesign() or gsDesign::gsSurv().
Public fields
targetTarget design function name (
"gsDesign"or"gsSurv").base_argsNamed list of fixed arguments passed to the target function.
tune_specsNamed list of tuning specifications for explored arguments.
param_spaceInternal parameter space used for configuration generation.
specAudit record including base/tuned args and
sessionInfo().
Methods
Method new()
Create a new tune job.
Usage
GSDTuneJob$new(target = c("gsDesign", "gsSurv", "gsSurvCalendar"), args)Method run()
Evaluate configurations under a search strategy.
Usage
GSDTuneJob$run(
strategy = c("grid", "random"),
n = NULL,
parallel = TRUE,
seed = NULL,
cache_dir = NULL,
metrics_fun = NULL
)Method table()
Render a compact results table with tinytable.
Returns a tinytable object which knits to HTML/LaTeX automatically in
R Markdown and can also be printed explicitly with
print(x, output = "html") or print(x, output = "latex").
Usage
GSDTuneJob$table(
data = NULL,
columns = NULL,
n = NULL,
caption = NULL,
notes = NULL,
digits = 3,
theme = "striped"
)Arguments
dataOptional results-like data.frame to render. Defaults to
$results().columnsOptional character vector of columns to display, in order. When
NULL, a compact default set is chosen automatically. Explicit column selections are preserved, including audit/internal columns.nOptional number of rows to display.
captionOptional table caption.
notesOptional table notes passed to
tinytable::tt().digitsNumber of digits for numeric columns.
themeTinytable theme passed to
tinytable::tt(). Defaults to"striped".
Method best()
Rank configurations by a metric (with optional constraints).
Usage
GSDTuneJob$best(metric, direction = c("min", "max"), constraints = NULL)Method plot()
Create a quick exploration plot.
Examples
job <- GSDTuneJob$new(target = "gsDesign", args = list(k = 3, alpha = 0.025))
job$spec$target
#> [1] "gsDesign"