[ https://issues.apache.org/jira/browse/MATH1466?page=com.atlassian.jira.plugin.system.issuetabpanels:alltabpanel
]
Rebecca updated MATH1466:

Description:
Class CMAESOptimizer ([java.lang.Objecthttp://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?isexternal=true]
[org.apache.commons.math3.optim.BaseOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/BaseOptimizer.html]<PAIR>
[org.apache.commons.math3.optim.BaseMultivariateOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/BaseMultivariateOptimizer.html]<[PointValuePairhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/PointValuePair.html]>
[org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.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 [rwolkoff@umich.edumailto: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;
}
was:
Class CMAESOptimizer ([java.lang.Objecthttp://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?isexternal=true]
[org.apache.commons.math3.optim.BaseOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/BaseOptimizer.html]<PAIR>
[org.apache.commons.math3.optim.BaseMultivariateOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/BaseMultivariateOptimizer.html]<[PointValuePairhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/PointValuePair.html]>
[org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.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 [rwolkoff@umich.edumailto:rwolkoff@umich.edu] if more info is needed.
> CMAES Optimization Fails to find Actual Optimum if Solution Value is Negative
> 
>
> Key: MATH1466
> URL: https://issues.apache.org/jira/browse/MATH1466
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.6.1
> Reporter: Rebecca
> Priority: Major
> Labels: Optimization
>
> Class CMAESOptimizer ([java.lang.Objecthttp://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?isexternal=true]
> [org.apache.commons.math3.optim.BaseOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/BaseOptimizer.html]<PAIR>
> [org.apache.commons.math3.optim.BaseMultivariateOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/BaseMultivariateOptimizer.html]<[PointValuePairhttp://commons.apache.org/proper/commonsmath/javadocs/api3.4/org/apache/commons/math3/optim/PointValuePair.html]>
> [org.apache.commons.math3.optim.nonlinear.scalar.MultivariateOptimizerhttp://commons.apache.org/proper/commonsmath/javadocs/api3.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 [rwolkoff@umich.edumailto: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;
> }
>

This message was sent by Atlassian JIRA
(v7.6.3#76005)
