Closed julianesiebourg closed 4 months ago
this could be done in the optimize_design()
, you could pass a named vector which then will be added to $trace
.
there are two potential downsides to this:
optimize_design()
already have a lot of arguments. and i am not sure if there's a way to pass this otherwise (maybe attributes of the scoring functions?)bc$trace <- bc$trace %>% mutate(by = ...)
bc
What do the others think?
CC @banfai @ingitwetrust
Hi Iakov, I think that this parameter would be a useful thing to have. The complexity of the interface is of course a valid mater of concern, but being used properly I would say that the clarity in the trace output outweighs the little comnplexity gain. Most of the times people would probably use standard scoring functions or wrappers, so using this feature within the package (e.g. in the "by parameters" wrapper that we want to create) would help users to understand better what went on during the optimization. See the example of Juliane^s output. Well just my 2p... or 4p considering the inflation.. ;)
what's your take on an approach where optimize_multi_plate_design()
will just manually add a column to the trace object w/o modifying the code for the optimize_design()
function?
Hi Iakov, this could be a useful way to implement it in a "minimally invasive" approach. It would still warrant a functional interface to add such a column to the trace, right? This could then be used by other wrappers or... if we see fit.. the optimizer itself...
sorry for a slow reply; no special function required, as far as I understand.
I'd suggest going for this for now:
bc$trace <- bc$trace |> mutate(by = ...)
bc
and if we find limitations, we could revisit.
please feel free to reopen.
Would it be possible to give names to the optimization indices? In case of the plate wrapper they could be the plate names. Similarly, if we think about the "optimize_design_by " function, it could just be a column for the "by" variable levels.
It adds another column to the score tables but if they are made factors, maybe that's not too bad?
It could simplify trace plots if not all "scores" were used in all optimization runs: