Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Jan 17, 2024

Conversation

Doresic
Copy link
Contributor

@Doresic Doresic commented Jan 15, 2024

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.

Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, how about

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

?

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

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 ⚠️

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

Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Doresic
Copy link
Contributor Author

Doresic commented Jan 15, 2024

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?

pypesto/hierarchical/base_problem.py Outdated Show resolved Hide resolved
pypesto/hierarchical/inner_calculator_collector.py Outdated Show resolved Hide resolved
pypesto/problem/base.py Outdated Show resolved Hide resolved
pypesto/problem/base.py Outdated Show resolved Hide resolved
pypesto/problem/hierarchical.py Outdated Show resolved Hide resolved
pypesto/problem/hierarchical.py Show resolved Hide resolved
@Doresic Doresic marked this pull request as ready for review January 15, 2024 13:02
Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

pypesto/problem/base.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@PaulJonasJost PaulJonasJost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks :)

pypesto/hierarchical/inner_calculator_collector.py Outdated Show resolved Hide resolved
@Doresic Doresic merged commit 65d4ec6 into develop Jan 17, 2024
18 checks passed
@Doresic Doresic deleted the add_hierarchical_to_problem branch January 17, 2024 11:48
This was referenced Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants