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

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

[Octave-patch-tracker] [patch #8918] fgridsearch as a gridsearch alterna


From: Kai Torben Ohlhus
Subject: [Octave-patch-tracker] [patch #8918] fgridsearch as a gridsearch alternative to fminsearch
Date: Tue, 08 Mar 2016 12:46:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36

Follow-up Comment #1, patch #8918 (project octave):

This function basically does something according to the following code:


[X, Y] = ndgrid ([-1, 0, 1], [-1, 0, 1]);
X = X(:);
Y = Y(:);
Z = X.^2 + Y.^2;
fmin = min (Z)
[X(find (Z == min (Z))), Y(find (Z == min (Z)))]


Some points to consider:

1. This function is not MATLAB compatible. Is there a particular
reason/scientific discipline, that needs this function and is not able to
write code, like the small listing above?
2. The documentation is not very detailed, better document the input and
output. See other Octave functions as guideline:

http://hg.savannah.gnu.org/hgweb/octave/file/74a676d5ce09/scripts/optimization/fminsearch.m

3. Does this function work for dimensions > 2?
4. How does this function perform for large scale problems?
5. I notice function crashes, without help for the user, for nonconforming
input like


params = fgridsearch(@(x) x(1)^2 + x(2)^2, [-1, 0, 1], [-1, 0, 1], 'a')
params = fgridsearch(@(x) x(1)^2 + x(2)^2, [-1, 0, 1], [-1, 0, 1], {1})


To sum up, I don't see the benefits of this function. If one needs to evaluate
the whole optimization domain, like fgridsearch does, one will code something
like in this post above. fminsearch addresses another use case, where only the
optimum matters and from this point one can try to evaluate a local grid, to
save lots of computational effort.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8918>

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




reply via email to

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