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

Fixing Nelder-Mead in box optimization #1080

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lalondeo
Copy link

This fixes the issue raised in #912. When Nelder-Mead's initial state is created, some of the points in the simplex lie outside of the box, so that the value of the corresponding logarithm is infinite. Since the barrier parameter is initially zero, this results in the objective's value at those points being zero * Inf = NaN, which trips up the optimizer. Starting out with a small but nonzero barrier parameter instead fixes the issue (resulting in the objective being infinite outside the box) and the code snippets that were given in the aforementioned post now give the correct results. However, this is more of a band-aid than anything else, as it seems reasonable to think that the points in Nelder-Mead's simplex should always satisfy the box constraints. Enforcing this would require changing large portions of the code.

@pkofod
Copy link
Member

pkofod commented Mar 21, 2024

Thank you, I will have a look.

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.80%. Comparing base (78ab1f4) to head (de4a317).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1080      +/-   ##
==========================================
- Coverage   84.85%   84.80%   -0.06%     
==========================================
  Files          46       46              
  Lines        3480     3481       +1     
==========================================
- Hits         2953     2952       -1     
- Misses        527      529       +2     

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

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.

None yet

2 participants