ParamHelpers icon indicating copy to clipboard operation
ParamHelpers copied to clipboard

Param set sugar, take 2

Open mb706 opened this issue 7 years ago • 5 comments

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     -

mb706 avatar Dec 11 '17 20:12 mb706

Pretty much all the magic happens in R/ParamSetSugar.R.

mb706 avatar Dec 11 '17 20:12 mb706

Coverage Status

Coverage increased (+0.1%) to 96.186% when pulling 7e3e20926157b680ea2cb352b0afbd1b25a4fe72 on paramSetSugar into 59c649e2cac0ab51a17444b81f998d824752a136 on master.

coveralls avatar Dec 11 '17 20:12 coveralls

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.

jakob-r avatar Dec 12 '17 11:12 jakob-r

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?

berndbischl avatar Dec 12 '17 11:12 berndbischl

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.

mb706 avatar Dec 13 '17 16:12 mb706