Either number of parameters or sum over parameter lengths.
getParamNr(par.set, devectorize = FALSE)
ParamSet
Parameter set.
(logical(1)
)
Sum over length of vector parameters?
Default is codeFALSE.
ps = makeParamSet(
makeNumericParam("u"),
makeDiscreteVectorParam("x", len = 2, values = c("a", "b"))
)
getParamNr(ps)
#> [1] 2
getParamNr(ps, devectorize = TRUE)
#> [1] 3