bedapub / designit

Blocking and randomization for experimental design
https://bedapub.github.io/designit/
Other
7 stars 1 forks source link

Named optimization runs? #34

Closed julianesiebourg closed 4 months ago

julianesiebourg commented 10 months ago

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: image

idavydov commented 10 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:

What do the others think?

CC @banfai @ingitwetrust

ingitwetrust commented 10 months ago

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.. ;)

idavydov commented 9 months ago

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?

ingitwetrust commented 9 months ago

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...

idavydov commented 4 months ago

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.