[jira] [Created] (MATH-864) CMAESOptimizer does not enforce bounds

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)
Frank Hess created MATH-864:
-------------------------------

             Summary: CMAESOptimizer does not enforce bounds
                 Key: MATH-864
                 URL: https://issues.apache.org/jira/browse/MATH-864
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 3.0
            Reporter: Frank Hess


The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)

    [ https://issues.apache.org/jira/browse/MATH-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459039#comment-13459039 ]

Frank Hess commented on MATH-864:
---------------------------------

Some more info: I see now that FitnessFunction.value will "repair" the parameters to be in-bounds before passing them to computeObjectiveValue.  However, the generationLoop does not "repair" the parameters when storing the optimum parameter values, it saves the unrepaired values (which may be outside of bounds).
               

> CMAESOptimizer does not enforce bounds
> --------------------------------------
>
>                 Key: MATH-864
>                 URL: https://issues.apache.org/jira/browse/MATH-864
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Frank Hess
>
> The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)
In reply to this post by Peter Lee (Jira)

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

Frank Hess updated MATH-864:
----------------------------

    Affects Version/s: 3.1
   

> CMAESOptimizer does not enforce bounds
> --------------------------------------
>
>                 Key: MATH-864
>                 URL: https://issues.apache.org/jira/browse/MATH-864
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0, 3.1
>            Reporter: Frank Hess
>
> The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)
In reply to this post by Peter Lee (Jira)

    [ https://issues.apache.org/jira/browse/MATH-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459106#comment-13459106 ]

Gilles commented on MATH-864:
-----------------------------

bq. I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

It would be very helpful if you could set up a unit test (i.e. a minimal example) showing the failure.
Thanks.

bq. the generationLoop does not "repair" the parameters when storing the optimum parameter values

That looks suspicious indeed.

               

> CMAESOptimizer does not enforce bounds
> --------------------------------------
>
>                 Key: MATH-864
>                 URL: https://issues.apache.org/jira/browse/MATH-864
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0, 3.1
>            Reporter: Frank Hess
>
> The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)
In reply to this post by Peter Lee (Jira)

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

Frank Hess updated MATH-864:
----------------------------

    Attachment: Math864Test.java

Test program that shows bug.
               

> CMAESOptimizer does not enforce bounds
> --------------------------------------
>
>                 Key: MATH-864
>                 URL: https://issues.apache.org/jira/browse/MATH-864
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0, 3.1
>            Reporter: Frank Hess
>         Attachments: Math864Test.java
>
>
> The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)
In reply to this post by Peter Lee (Jira)

    [ https://issues.apache.org/jira/browse/MATH-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460517#comment-13460517 ]

Gilles commented on MATH-864:
-----------------------------

Thanks for the report, the show-case and the hint toward solving this problem.
Fix committed in revision 1388517. Please test.

               

> CMAESOptimizer does not enforce bounds
> --------------------------------------
>
>                 Key: MATH-864
>                 URL: https://issues.apache.org/jira/browse/MATH-864
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0, 3.1
>            Reporter: Frank Hess
>         Attachments: Math864Test.java
>
>
> The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)
In reply to this post by Peter Lee (Jira)

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

Gilles updated MATH-864:
------------------------

    Affects Version/s:     (was: 3.1)
        Fix Version/s: 3.1
             Assignee: Gilles
   

> CMAESOptimizer does not enforce bounds
> --------------------------------------
>
>                 Key: MATH-864
>                 URL: https://issues.apache.org/jira/browse/MATH-864
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Frank Hess
>            Assignee: Gilles
>             Fix For: 3.1
>
>         Attachments: Math864Test.java
>
>
> The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)
In reply to this post by Peter Lee (Jira)

    [ https://issues.apache.org/jira/browse/MATH-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460901#comment-13460901 ]

Frank Hess commented on MATH-864:
---------------------------------

Thanks, seems to be fixed testing with revision 1388555.
               

> CMAESOptimizer does not enforce bounds
> --------------------------------------
>
>                 Key: MATH-864
>                 URL: https://issues.apache.org/jira/browse/MATH-864
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Frank Hess
>            Assignee: Gilles
>             Fix For: 3.1
>
>         Attachments: Math864Test.java
>
>
> The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (MATH-864) CMAESOptimizer does not enforce bounds

Peter Lee (Jira)
In reply to this post by Peter Lee (Jira)

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

Gilles resolved MATH-864.
-------------------------

    Resolution: Fixed
   

> CMAESOptimizer does not enforce bounds
> --------------------------------------
>
>                 Key: MATH-864
>                 URL: https://issues.apache.org/jira/browse/MATH-864
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Frank Hess
>            Assignee: Gilles
>             Fix For: 3.1
>
>         Attachments: Math864Test.java
>
>
> The CMAESOptimizer can exceed the bounds passed to optimize.  Looking at the generationLoop in doOptimize(), it does a bounds check by calling isFeasible() but if checkFeasableCount is zero (the default) then isFeasible() is never even called.  Also, even with non-zero checkFeasableCount it may give up before finding an in-bounds offspring and go forward with an out-of-bounds offspring.  This is against svn revision 1387637.  I can provide an example program where the optimizer ends up with a fit outside the prescribed bounds if that would help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira