You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use CMA-ES to fit many different versions of equations and sometimes a combination of parameters is such that the target function returns NaN.
Currently, the minimization just continues until it reaches maxiter and then stops.
Can I use callback or modify stopping criteria to stop the minimization if the target function returns NaN?
The text was updated successfully, but these errors were encountered:
Actually, never mind. For my case, the target function always returns NaN so I can just determine this before using minimize(), and that solves my issue.
But this is actually a good question! There is a hacky way of achieving this, but I should think about better ways.
The hack is to manually hit a stopping criterion, when the callback detects a NaN.
Example:
I use CMA-ES to fit many different versions of equations and sometimes a combination of parameters is such that the target function returns
NaN
.Currently, the minimization just continues until it reaches maxiter and then stops.
Can I use callback or modify stopping criteria to stop the minimization if the target function returns
NaN
?The text was updated successfully, but these errors were encountered: