You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2021/08/22 01:35:00 UTC

[jira] [Resolved] (MATH-1466) CMAES Optimization Fails to find Actual Optimum if Solution Value is Negative

     [ https://issues.apache.org/jira/browse/MATH-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles Sadowski resolved MATH-1466.
-----------------------------------
    Resolution: Cannot Reproduce

> 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 [rwolkoff@umich.edu|mailto: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
(v8.3.4#803005)