Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Cannot Reproduce
-
3.6.1
-
None
-
None
Description
Class CMAESOptimizer (java.lang.Object
org.apache.commons.math3.optim.BaseOptimizer<PAIR>
org.apache.commons.math3.optim.BaseMultivariateOptimizer<PointValuePair>
org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer
org.apache.commons.math3.optim.nonlinear.scalar.noderiv.CMAESOptimizer)
I cannot provide code as I work for a private company with IP. However, my tests indicate that if the we are minimizing a cost function, and the function's value is a negative value, the resulting solution is incorrect.
For example, say I were minimizing y = x^2 - 100
The solution should be x = 0, with a value of -100. However, this CMAES optimizer would find random solutions, like x = 3 or x = -2 (with solutions of -91 and -96 respectively).
I used the BOBYQA solver, and it was able to find the solution of x = 0 with a value of y = -100. I tested y = x^2 + 100 and the CMAES solver was able to find a solution of x = 0, y = 100. I tested y = x^2 and the CMAES the CMAES solver was able to find a solution of x = 0, y = 0. I tested y = x^2 -1 and the CMAES solver was NOT able to find a solution of x = 0, y = -1.
I know it is highly inconvenient, but if someone wants to take a look at my cost function I can try to get an NDA. I think this bug is reproducible without it. Feel free to contact me at rwolkoff@umich.edu if more info is needed.
I think it has to do with the following stop criteria, which ends early if the cost is negative:
if (stopFitness != 0 && bestFitness < (isMinimize ? stopFitness : -stopFitness))
{ break generationLoop; }