Comments (4)
The direct setting you are looking for is settings.FuncEvaluations. The optimization will stop after 5 function evaluations.
The concept of "Iteration" is not synonymous with function evaluation, and is a more nebulous term. We have taken whatever the view is of the optimizer. In the quasi-Newton methods, an "Iteration" is "choose a direction and perform a linesearch" this often takes more than one function evaluation.
It sounds like you are just supplying Func
and not Grad
. At present, you will thus be using Nelder-Mead. It requires dim+1
function evaluations to even construct the original simplex, and sometimes an iteration of nelder mead (defined as updating the simplex size) requires dim+1
evaluations. This is how you could find such a big disparity between them.
In short, setting FuncEvaluations
is likely what you want, but know that if your limit is as low as 5 you might not get very far without supplying a gradient.
from optimize.
Thanks for the excellent answer! The outcome did seem a bit "suspicious" to me :-)
The results I've mentioned here actually did use gradient as well. The particular optimization method I have used was optimize.BFGS{}
Thanks a lot for you explanation, it now makes more sense to me!
from optimize.
Could you test if FuncEvaluations is doing what you think it should? I'm surprised with BFGS it's taking 100 function evaluations in 5 iterations. Perhaps the problem isn't very well scaled?
from optimize.
Yes FuncEvaluations
does seem to work as you described.
And again, yes, the problem is defo not scaled - if by scaling you mean some kind of normalization to some unit sizes. I tested this on some hand-crafted data with no normalization performed.
Thanks for your answers!
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
- 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
- Update of OptLoc on every iteration causes flaky optimization runs HOT 11
- 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.