ICB-DCM / pyPESTO

python Parameter EStimation TOolbox
https://pypesto.readthedocs.io
BSD 3-Clause "New" or "Revised" License
216 stars 47 forks source link

Problem: add inner problem names, bounds and hierarchical flag #1282

Closed Doresic closed 7 months ago

Doresic commented 7 months ago

Added a hierarchical flag to Problem indicating it is a hierarchical problem. In that case, it contains inner_x_names, inner_lb, and inner_ub of interpretable inner parameters (scaling, offset, noise). I exclude non-interpretable ones (spline & ordinal) as there can easily be too many of them and they are truly hard to interpret by themselves.

codecov-commenter commented 7 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (b455307) 84.41% compared to head (443e58d) 82.48%.

Files Patch % Lines
pypesto/problem/hierarchical.py 88.00% 3 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1282 +/- ## =========================================== - Coverage 84.41% 82.48% -1.94% =========================================== Files 152 153 +1 Lines 12421 12450 +29 =========================================== - Hits 10485 10269 -216 - Misses 1936 2181 +245 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Doresic commented 7 months ago

Hi, how about

class HierarchicalProblem(Problem):
    ...
    def __init__(...):
        inner_{x_names,lb,ub} = ...

?

Hmm yeah, that'll be nicer. Will change it up.

EDIT: is it ok to stay in pypesto/problem/base.py? Or should it be in pypesto/problem/hierarchical.py. Or is that confusing, and it should be in pypesto/hierarchical/problem or something similar?