octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47272] Get a list of all function evaluations


From: Rik
Subject: [Octave-bug-tracker] [bug #47272] Get a list of all function evaluations of fminsearch
Date: Fri, 26 Feb 2016 16:41:57 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #1, bug #47272 (project octave):

Have you tried the Display option?  It might already provide what you need.


help optimset

    Display
          Request verbose display of results from optimizations.  Values
          are:

          "off" [default]
               No display.

          "iter"
               Display intermediate results for every loop iteration.

          "final"
               Display the result of the final loop iteration.

          "notify"
               Display the result of the final loop iteration if the
               function has failed to converge.


Trying on the example in the fminsearch documentation


opts = optimset ("Display", "iter");

fminsearch (@(x) (x(1)-5).^2+(x(2)-8).^4, [0;0], opts)

f(x0) = -4.1210e+03
Iter.  1,  how = initial    nf =   3,  f = -2.4706e+03  (40.0%)
Iter.  2,  how = expand,    nf =   5,  f = -1.4526e+03  (41.2%)
Iter.  3,  how = expand,    nf =   7,  f = -3.6041e+02  (75.2%)
Iter.  4,  how = expand,    nf =   9,  f = -8.2275e+00  (97.7%)
Iter.  5,  how = reflect,   nf =  11,  f = -2.4633e+00  (70.1%)
Iter.  6,  how = contract,  nf =  13,  f = -1.3366e+00  (45.7%)
Iter.  7,  how = contract,  nf =  15,  f = -8.0682e-01  (39.6%)
Iter.  8,  how = reflect,   nf =  17,  f = -5.3167e-01  (34.1%)
Iter.  9,  how = contract,  nf =  19,  f = -6.5457e-02  (87.7%)
Iter. 10,  how = contract,  nf =  21,  f = -6.5457e-02  (0.0%)
Iter. 11,  how = shrink,    nf =  25,  f = -2.4286e-02  (62.9%)
Iter. 12,  how = contract,  nf =  27,  f = -2.4286e-02  (0.0%)
Iter. 13,  how = expand,    nf =  29,  f = -1.2372e-03  (94.9%)
Iter. 14,  how = contract,  nf =  31,  f = -1.2372e-03  (0.0%)
Iter. 15,  how = contract,  nf =  33,  f = -1.2372e-03  (0.0%)
Iter. 16,  how = reflect,   nf =  34,  f = -1.2372e-03  (0.0%)
Iter. 17,  how = contract,  nf =  36,  f = -1.0750e-03  (13.1%)
Iter. 18,  how = contract,  nf =  38,  f = -7.6996e-04  (28.4%)
Iter. 19,  how = contract,  nf =  40,  f = -7.5565e-06  (99.0%)
Iter. 20,  how = reflect,   nf =  41,  f = -7.5565e-06  (0.0%)
Iter. 21,  how = contract,  nf =  43,  f = -7.5565e-06  (0.0%)
Iter. 22,  how = contract,  nf =  45,  f = -7.5565e-06  (0.0%)
Iter. 23,  how = reflect,   nf =  46,  f = -7.5565e-06  (0.0%)
Iter. 24,  how = shrink,    nf =  50,  f = -7.5565e-06  (0.0%)
Iter. 25,  how = contract,  nf =  52,  f = -5.5181e-07  (92.7%)
Iter. 26,  how = contract,  nf =  54,  f = -5.5181e-07  (0.0%)
Iter. 27,  how = reflect,   nf =  55,  f = -5.5181e-07  (0.0%)
Iter. 28,  how = contract,  nf =  57,  f = -2.5979e-07  (52.9%)
Iter. 29,  how = contract,  nf =  59,  f = -2.5979e-07  (0.0%)
Iter. 30,  how = reflect,   nf =  61,  f = -2.0956e-07  (19.3%)
Iter. 31,  how = contract,  nf =  63,  f = -1.0911e-08  (94.8%)
Iter. 32,  how = reflect,   nf =  64,  f = -1.0911e-08  (0.0%)
Iter. 33,  how = shrink,    nf =  68,  f = -1.0768e-08  (1.3%)
Iter. 34,  how = contract,  nf =  70,  f = -2.2601e-09  (79.0%)
Iter. 35,  how = reflect,   nf =  72,  f = -8.5887e-10  (62.0%)
Iter. 36,  how = contract,  nf =  74,  f = -8.5887e-10  (0.0%)
Iter. 37,  how = contract,  nf =  76,  f = -4.5694e-10  (46.8%)
Iter. 38,  how = contract,  nf =  78,  f = -1.8423e-11  (96.0%)
Iter. 39,  how = contract,  nf =  80,  f = -1.8423e-11  (0.0%)
Iter. 40,  how = shrink,    nf =  84,  f = -1.8423e-11  (0.0%)
Simplex size 8.3015e-05 <= 1.0000e-04...quitting
ans =

   5.0000
   7.9992





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47272>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]