ParamHelpers
ParamHelpers copied to clipboard
Param set sugar, take 2
Alternative API for creating ParamSet objects, using nonstandard evaluation to enable short and concise input.
> pSS(a: logical, b: integer[0, 10], c: numeric^2)
Type len Def Constr Req Tunable Trafo
a logical - - - - TRUE -
b integer - - 0 to 10 - TRUE -
c numericvector 2 - -Inf to Inf - TRUE -
Pretty much all the magic happens in R/ParamSetSugar.R.
Coverage increased (+0.1%) to 96.186% when pulling 7e3e20926157b680ea2cb352b0afbd1b25a4fe72 on paramSetSugar into 59c649e2cac0ab51a17444b81f998d824752a136 on master.
It looks nice. What are your thoughts on putting it in a little extra package. ParamHelperHelper? :sweat_smile: Just in case we can not decide whether we want a new meta language to be part of PH.
it really shouldnt go into yet another package. but we might put it into PH2? that seems pretty advanced and we can then push a bigger change through?
What is the ETA of that? Does PH2 break much compatibility with the current "ParamHelpers"? I rely on Param Set Sugar in mlrCPO, but medium term I can also just ship it in mlrCPO if you think it doesn't belong here.