Comments (11)
I have previously argued for OptLoc, but I did not consider this case. Something else needs to be done.
I'm not sure what the correct fix is. In gradient-based methods, every new Major iteration has a (weakly) lower function value. The one catch is if the number of function evaluations is reached in the middle of a linesearch, and then Local should return the better point of the last major iteration and the current location (and thus storing OptLoc still has merit). Yea, it's unfortunate to lose the better value returned, but the point is to find a local minimum and that was found.
This doesn't work as smoothly for gradient-free optimization. The start of every MajorIteration does not necessarily indicate a better function value. With NelderMead, for instance, it could have its best location at the first step, and then shrink until convergence, never finding a better value. Here it seems like we should return the best value found, because there is no guarantee of getting successfully better function values.
Ideas? @vladimir-ch
from optimize.
Now we check for improvement and update OptLoc at every (Major|Minor|Sub)Iteration
. Wouldn't updating of OptLoc at only MajorIteration
solve the issue? We would miss troughs leading to lower minima but that is inevitable anyway.
from optimize.
It's not so clear. Take for example Nelder Mead. When it shrinks the vertexes, it gets a whole bunch of new points in one sub-iteration. One of those may be the new minimum, but it may not be the most recent evaluation. This would be a good use case for the location being different and requesting NoEvaluation, but breaks the invariant that Location is only a one-way communication to Method.
from optimize.
My understanding of the meaning of MajorIteration
is that the method has made some (unspecified) progress and that it is time to check for convergence. Linesearch is lucky that the location for MajorIteration coincides with the location from MinorIteration. From this point of view, Nelder-Mead would have to keep track of the best location internally and use it when announcing major iteration.
from optimize.
Based on the current abstraction, there is no mechanism for the Method to announce such information. Right now, Method is supposed to receive information from Location and fill in nextLocation (it is not supposed to modify Location). Nelder-Mead would have to modify Location (and Local would have to be able to interpret such modifications) in order to do such a form of announcing.
from optimize.
You do hint at the broader problem which is that we (eventually) need to decide what the various iteration types actually mean. I think it's okay that we don't have a formal definition yet (as it shifts as we discover things), but we should be keeping that in mind.
from optimize.
Of course, you are right, I didn't realize that that would mean modifying Location. I'll ponder it further.
Agreed on the meaning of iteration types.
from optimize.
We could solve the issue by defining the meaning of iteration types. Just thinking aloud. We could have four iteration types as we have now with clear meaning and actions taken when received (without caring about the names for the moment):
MajorIteration
: location is complete, can be considered for storing in optloc and convergence should be checked (i.e., just as it is now)MinorIteration
: location is complete, can be considered for storing in optloc, but convergence should not be checked yet (i.e., Linesearch would have to be changed, Nelder-Mead would use this iteration)SubIteration
: location is not complete (Linesearch would use this iteration during line search and for evaluating invalid fields in location)NoIteration
: same as now
It is slightly artificial and tailored for the current Methods in optimize, but it is an option nonetheless.
Another option is to take the ORable approach as with the function evaluations. Methods could compose the iteration type from some elementary types that would indicate what should/can be done with the location.
from optimize.
I wonder if I should have closed this with #123, @btracey ?
from optimize.
Yes, I think so. MajorIteration has a clear meaning, and the others are gone.
from optimize.
Fixed by #123
from optimize.
Related Issues (20)
- Change from Function et al. interfaces + magic to input functions struct HOT 5
- Clearly define meaning of the various iteration types HOT 5
- Make optimize silent by default
- Method does not need ProblemInfo HOT 1
- LinesearchMethod.Iterate() is subtly wrong HOT 6
- Better name for ErrNonNegativeStepDirection
- Linesearchers should check function value before asking for gradient HOT 8
- Linesearchers should test function decrease to within a tolerance HOT 2
- Pass a copy of X to evaluation routines HOT 2
- Change the order of arguments for evaluation routines like Grad() and Hess()
- Remove Linesearcher.Finished()
- Change FunConst and GradConst to DecreaseFactor and CurvatureFactor
- [question] MajorIterations settings HOT 4
- optimize: curve-fitting - implement Levenberg-Marquardt algorithm (damped least-squares) HOT 7
- optimize: Add CMA-ES optimization algorithm HOT 3
- optimize: Repo description should not end with a "." HOT 4
- optimize: NewPrinter should accept an io.Writer HOT 1
- optimize: allow constrained optimization HOT 6
- Statuser docs are not accurate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optimize.