|
From: Dima <dim...@go...> - 2009-09-05 11:27:56
|
1: CostFunction::values()
As far as I see, the values function is not needed anywhere, except in the
Levenberg Marquardt
optimizer. Can we change it from a pure virtual function to a virtual which
by default returns
a one dimensional array with values(x)? It is confusing and takes a while to
understand why
-and if- it is needed at all. For example, if I understand the code
correctly, if you optimize with Simplex,
you can set values to any value (e.g.1000). In my opinion it is an overkill
to make it pure virtual just in case
somebody uses LM. I'd rather suggest to test in LM whether the function has
been overwritten.
2. EndCriteria:
Most of the functions do not use all of the passed values. I haven't found
one which uses the gradient
norm. Please correct me if I'm wrong. Most of them use max iterations anf
function value epsilon.
I think it might be better to make this clean such that the user doesn't
have a wrong impression, that
actually everything is checked. I haven't found one optimizer which checks
min stationary value.
For example, in Simplex: endCriteria.checkStationaryPoint(0.0, 0.0,
maxStationaryStateIterations_, ecType);
does that, but maxStationaryStateIterations_ is not increased anywhere
during the optimization.
All points above subject to non-blindness of author of this mail :)
|