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

misleading convergence message for SAMIN #960

Closed
mcreel opened this issue Nov 7, 2021 · 1 comment · Fixed by #988
Closed

misleading convergence message for SAMIN #960

mcreel opened this issue Nov 7, 2021 · 1 comment · Fixed by #988

Comments

@mcreel
Copy link
Contributor

mcreel commented Nov 7, 2021

The convergence message for SAMIN is misleading. An example is

using Optim
rosenbrock(x, p) =  (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2

function main()
x0 = zeros(2)
p  = [1.0, 100.0]
obj = x -> rosenbrock(x,p)
lb = fill(-100., 2)
ub = fill(100., 2)
prob = Optim.optimize(obj, lb, ub, x0, SAMIN(), Optim.Options(iterations=10^6))
end
main()

This code results in

SAMIN results
==> Normal convergence <==
total number of objective function evaluations: 23751

     Obj. value:      0.0000000000

       parameter      search width
         1.00000           0.00000 
         1.00000           0.00000 
================================================================================

  0.315491 seconds (964.68 k allocations: 52.287 MiB, 47.06% gc time, 97.00% compilation time)
 * Status: failure

followed by additional output. The convergence criteria that Optim is checking are not directly applicable to the results that SAMIN generates. This output is for a successful run, but Optim is stating that it is a failure.

@pkofod
Copy link
Member

pkofod commented Feb 4, 2022

I agree, that's poor wording. Thanks for reminding me.

@pkofod pkofod linked a pull request Sep 4, 2022 that will close this issue
pkofod pushed a commit that referenced this issue Sep 4, 2022
* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* SAMIN convergence message

* update SAMIN convergence message (fix issue #960)

* update SAMIN convergence message (fix issue #960)

Co-authored-by: Michael Creel <michael.creel@uab.es>
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 a pull request may close this issue.

2 participants