[
https://issues.apache.org/jira/browse/MATH-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rebecca updated MATH-1466:
--------------------------
Description:
Class CMAESOptimizer
([java.lang.Object|http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true]
[org.apache.commons.math3.optim.BaseOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/BaseOptimizer.html]<PAIR>
[org.apache.commons.math3.optim.BaseMultivariateOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/BaseMultivariateOptimizer.html]<[PointValuePair|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/PointValuePair.html]>
[org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/nonlinear/scalar/MultivariateOptimizer.html]
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 [[email protected]|mailto:[email protected]]
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;
}
was:
Class CMAESOptimizer
([java.lang.Object|http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true]
[org.apache.commons.math3.optim.BaseOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/BaseOptimizer.html]<PAIR>
[org.apache.commons.math3.optim.BaseMultivariateOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/BaseMultivariateOptimizer.html]<[PointValuePair|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/PointValuePair.html]>
[org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/nonlinear/scalar/MultivariateOptimizer.html]
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 [[email protected]|mailto:[email protected]]
if more info is needed.
> CMAES Optimization Fails to find Actual Optimum if Solution Value is Negative
> -----------------------------------------------------------------------------
>
> Key: MATH-1466
> URL: https://issues.apache.org/jira/browse/MATH-1466
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.6.1
> Reporter: Rebecca
> Priority: Major
> Labels: Optimization
>
> Class CMAESOptimizer
> ([java.lang.Object|http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true]
> [org.apache.commons.math3.optim.BaseOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/BaseOptimizer.html]<PAIR>
> [org.apache.commons.math3.optim.BaseMultivariateOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/BaseMultivariateOptimizer.html]<[PointValuePair|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/PointValuePair.html]>
> [org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizer|http://commons.apache.org/proper/commons-math/javadocs/api-3.4/org/apache/commons/math3/optim/nonlinear/scalar/MultivariateOptimizer.html]
> 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
> [[email protected]|mailto:[email protected]] 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;
> }
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)