mlr-org / ParamHelpers

Helpers for parameters in black-box optimization, tuning and machine learning.
https://paramhelpers.mlr-org.com
Other
25 stars 9 forks source link

Param set sugar, take 2 #194

Open mb706 opened 6 years ago

mb706 commented 6 years ago

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 commented 6 years ago

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

coveralls commented 6 years ago

Coverage Status

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

jakob-r commented 6 years ago

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.

berndbischl commented 6 years ago

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?

mb706 commented 6 years ago

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.