paradox icon indicating copy to clipboard operation
paradox copied to clipboard

ParamSet might be too rich for some usecases

Open berndbischl opened this issue 4 years ago • 4 comments

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

berndbischl avatar Jun 27 '20 19:06 berndbischl

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.

jakob-r avatar Jun 29 '20 11:06 jakob-r

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

berndbischl avatar Jun 29 '20 11:06 berndbischl

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

jakob-r avatar Jun 30 '20 10:06 jakob-r

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

berndbischl avatar Jun 30 '20 23:06 berndbischl