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
If a want to restrict the f(x) calls I can use f_calls_limit in Options:
julia>optimize(f, x0, LBFGS(), Optim.Options(f_calls_limit=10))
* Status: failure
* Candidate solution
Final objective value:8.415971e-01* Found with
Algorithm: L-BFGS
* Convergence measures
|x - x'|=8.55e-02≰0.0e+00|x - x'|/|x'|=1.00e+00≰0.0e+00|f(x) -f(x')|=1.58e-01≰0.0e+00|f(x) -f(x')|/|f(x')|=1.88e-01≰0.0e+00|g(x)|=1.58e+00≰1.0e-08* Work counters
Seconds run:0 (vs limit Inf)
Iterations:1f(x) calls:10∇f(x) calls:10
However, if a want to restrict the area this f_calls_limit is less respected:
julia>optimize(f, [-5., -5], [5., 5.], x0, Fminbox(LBFGS()), Optim.Options(f_calls_limit=10))
* Status: success
* Candidate solution
Final objective value:5.377764e-17* Found with
Algorithm: Fminbox with L-BFGS
* Convergence measures
|x - x'|=5.23e-07≰0.0e+00|x - x'|/|x'|=3.70e-07≰0.0e+00|f(x) -f(x')|=0.00e+00≤0.0e+00|f(x) -f(x')|/|f(x')|=0.00e+00≤0.0e+00|g(x)|=3.48e-10≤1.0e-08* Work counters
Seconds run:0 (vs limit Inf)
Iterations:8f(x) calls:81∇f(x) calls:81
However, if I change f_calls_limit the calls is updated, I am not sure if it depends on seed random, but if I does not change f_calls_limit is maintained fixed.
julia>optimize(f, [-5., -5], [5., 5.], x0, Fminbox(LBFGS()), Optim.Options(f_calls_limit=40))
* Status: success
* Candidate solution
Final objective value:5.850631e-17* Found with
Algorithm: Fminbox with L-BFGS
* Convergence measures
|x - x'|=6.99e-07≰0.0e+00|x - x'|/|x'|=4.94e-07≰0.0e+00|f(x) -f(x')|=0.00e+00≤0.0e+00|f(x) -f(x')|/|f(x')|=0.00e+00≤0.0e+00|g(x)|=2.64e-10≤1.0e-08* Work counters
Seconds run:0 (vs limit Inf)
Iterations:3f(x) calls:57∇f(x) calls:57
The text was updated successfully, but these errors were encountered:
I have found a problem using Fminbox and f_calls_limit.
For instead, using the example for the documentation:
If a want to restrict the f(x) calls I can use f_calls_limit in Options:
However, if a want to restrict the area this f_calls_limit is less respected:
However, if I change f_calls_limit the calls is updated, I am not sure if it depends on seed random, but if I does not change f_calls_limit is maintained fixed.
The text was updated successfully, but these errors were encountered: