mlr-org / paradox

ParamHelpers Next Generation
https://paradox.mlr-org.com
GNU Lesser General Public License v3.0
28 stars 7 forks source link

ParamSet might be too rich for some usecases #287

Open berndbischl opened 4 years ago

berndbischl commented 4 years ago

Eg in bbotk we only use the PS to describe domain and codomains. But we now have defaults in there, and also "values" (which have both no place there)

> obj
<ObjectiveRFun:function>
Domain:
ParamSet: 
   id    class lower upper levels     default value
1: x1 ParamDbl    -1     1        <NoDefault>      
2: x2 ParamDbl    -1     1        <NoDefault>      
Codomain:
ParamSet: 
   id    class lower upper levels     default value
1:  y ParamDbl  -Inf   Inf        <NoDefault>      

maybe we should make that more configurable of have a hierarchies of classes

jakob-r commented 4 years ago

Do you really want to introduce a "sparse" parent class just to have a more tidy output? I don't know the OO lingo but introducing a class that is designed to have just one child seems to be overengeneering. I vote for close.

berndbischl commented 4 years ago

No, I never said that, the "print" is only a summary. Just think about it like this: You now use a PS for a domain of a function. A user writes into "values". Thats completely ignored. Thats at least weird?

I don't know the OO lingo but introducing a class that is designed to have just one child seems to be overengeneering.

that rule doesn't exist

jakob-r commented 4 years ago

You now use a PS for a domain of a function. A user writes into "values". Thats completely ignored. Thats at least weird?

Does it fall into the category: "The user can do stupid things, and we don't care."?

berndbischl commented 4 years ago

not really, as that API is publicly offered. I am not saying it is the most urgent issue, but i would maintain that this is not optimal....