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

Hierarchical log space startpoint sampling #1242

Merged
merged 8 commits into from
Dec 11, 2023

Conversation

Doresic
Copy link
Contributor

@Doresic Doresic commented Dec 8, 2023

The numerical inner solver of the scaling+offset parameters has a multi-start option. However, the multi-start sampling was done in linear space. In this version, bounds of scaling and offset are not possible. Because of that [-1e20, 1e20] dummy bounds were introduced. But that resulted in the linear sampling having huge values, mostly in the order of 10^19. These startpoints would never converge, rendering the multi-start approach practically useless.

I've implemented sampling in log space for the numerical solver. The values can be negative, so I couldn't directly use pypesto's log sampling. So I used a symmetric logarithm function np.sign(x) * np.log10(np.abs(x) + 1) transformation which supports negative values, sampled in that space, and transformed the values back with its inverse np.sign(x) * (10 ** np.abs(x) - 1).

@Doresic Doresic requested a review from dweindl as a code owner December 8, 2023 13:11
@Doresic Doresic changed the title log space startpoint sampling Hierarchical log space startpoint sampling Dec 8, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2023

Codecov Report

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

Comparison is base (160c2a8) 88.16% compared to head (27cd170) 82.44%.
Report is 472 commits behind head on develop.

Files Patch % Lines
pypesto/ensemble/ensemble.py 69.77% 68 Missing ⚠️
...ypesto/hierarchical/spline_approximation/solver.py 82.62% 53 Missing ⚠️
pypesto/ensemble/util.py 65.13% 38 Missing ⚠️
pypesto/hierarchical/optimal_scaling/solver.py 93.53% 26 Missing ⚠️
pypesto/history/base.py 88.57% 24 Missing ⚠️
pypesto/hierarchical/petab.py 84.56% 23 Missing ⚠️
pypesto/engine/mpi_pool.py 0.00% 22 Missing ⚠️
pypesto/hierarchical/inner_calculator_collector.py 88.51% 17 Missing ⚠️
...pesto/hierarchical/spline_approximation/problem.py 89.18% 16 Missing ⚠️
pypesto/hierarchical/problem.py 89.23% 14 Missing ⚠️
... and 15 more

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

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1242      +/-   ##
===========================================
- Coverage    88.16%   82.44%   -5.73%     
===========================================
  Files           79      148      +69     
  Lines         5257    11998    +6741     
===========================================
+ Hits          4635     9892    +5257     
- Misses         622     2106    +1484     

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

@dweindl dweindl requested a review from dilpath December 11, 2023 06:03
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.

Sounds reasonable to me.

pypesto/hierarchical/solver.py Outdated Show resolved Hide resolved
pypesto/hierarchical/solver.py Show resolved Hide resolved
Doresic and others added 3 commits December 11, 2023 10:04
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
Copy link
Member

@dilpath dilpath 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! Fine to merge as-is.

pypesto/hierarchical/solver.py Outdated Show resolved Hide resolved
pypesto/hierarchical/solver.py Outdated Show resolved Hide resolved
pypesto/hierarchical/solver.py Show resolved Hide resolved
Doresic and others added 3 commits December 11, 2023 13:05
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
@Doresic Doresic merged commit a1219ad into develop Dec 11, 2023
18 checks passed
@Doresic Doresic deleted the Fix_hierarchical_numerical_solver_startpoints branch December 11, 2023 12:47
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.

4 participants