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 (JIRA)" <ji...@apache.org> on 2010/11/13 21:53:14 UTC

[jira] Created: (MATH-441) Remove occurences of "FunctionEvaluationException"

Remove occurences of "FunctionEvaluationException"
--------------------------------------------------

                 Key: MATH-441
                 URL: https://issues.apache.org/jira/browse/MATH-441
             Project: Commons Math
          Issue Type: Task
            Reporter: Gilles
            Assignee: Gilles
            Priority: Minor
             Fix For: 3.0


As per the issue MATH-440, {{FunctionEvaluationException}} is now redundant and is going to removed.
We should remove the "throws" clauses that refer to it from all the methods' signature.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-441) Remove occurences of "FunctionEvaluationException"

Posted by "Gilles (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932020#action_12932020 ] 

Gilles commented on MATH-441:
-----------------------------

I'm not discussing the internal logic of the algorithm, but whether it has its place in CM because it makes an assumption that it is OK to catch user-generated exceptions.
However if you thinks that your suggestion is safe enough, I'll implement it.


> Remove occurences of "FunctionEvaluationException"
> --------------------------------------------------
>
>                 Key: MATH-441
>                 URL: https://issues.apache.org/jira/browse/MATH-441
>             Project: Commons Math
>          Issue Type: Task
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>
> As per the issue MATH-440, {{FunctionEvaluationException}} is now redundant and is going to removed.
> We should remove the "throws" clauses that refer to it from all the methods' signature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MATH-441) Remove occurences of "FunctionEvaluationException"

Posted by "Gilles (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles resolved MATH-441.
-------------------------

    Resolution: Fixed

All occurrences have been removed.

> Remove occurences of "FunctionEvaluationException"
> --------------------------------------------------
>
>                 Key: MATH-441
>                 URL: https://issues.apache.org/jira/browse/MATH-441
>             Project: Commons Math
>          Issue Type: Task
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>
> As per the issue MATH-440, {{FunctionEvaluationException}} is now redundant and is going to removed.
> We should remove the "throws" clauses that refer to it from all the methods' signature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-441) Remove occurences of "FunctionEvaluationException"

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931829#action_12931829 ] 

Luc Maisonobe commented on MATH-441:
------------------------------------

The MultiStart case was put this way because some start points may be out of bonds whereas other start points may lead to a feasible result.
So when an exception occurs for run number i, we simply set optima[i] to null and try another point. Once the total number of runs have been performed, we sort the array ensuring the null points are at the end and the feasible point at the beginning (see the private sortPairs method).
In fact, this is definitely a feature of multi-start since it allows to get around some difficult problems for which convergence is not guaranteed. It is documented in the javadoc (perhaps this documentation should be clarified, though).
One way to improve things and not swallow a programming error while still circumventing unstable functions would be to rethrow the last caught exception if it appears none of the starting points did provide a solution. So if only some start points fail and other lead to a result, we provide the result and ignore some exceptions, as documented, but if all points fail then there is a real problem and we forward it above.

> Remove occurences of "FunctionEvaluationException"
> --------------------------------------------------
>
>                 Key: MATH-441
>                 URL: https://issues.apache.org/jira/browse/MATH-441
>             Project: Commons Math
>          Issue Type: Task
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>
> As per the issue MATH-440, {{FunctionEvaluationException}} is now redundant and is going to removed.
> We should remove the "throws" clauses that refer to it from all the methods' signature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-441) Remove occurences of "FunctionEvaluationException"

Posted by "Gilles (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932038#action_12932038 ] 

Gilles commented on MATH-441:
-----------------------------

Done in revision 1035245.


> Remove occurences of "FunctionEvaluationException"
> --------------------------------------------------
>
>                 Key: MATH-441
>                 URL: https://issues.apache.org/jira/browse/MATH-441
>             Project: Commons Math
>          Issue Type: Task
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>
> As per the issue MATH-440, {{FunctionEvaluationException}} is now redundant and is going to removed.
> We should remove the "throws" clauses that refer to it from all the methods' signature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MATH-441) Remove occurences of "FunctionEvaluationException"

Posted by "Gilles (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931825#action_12931825 ] 

Gilles commented on MATH-441:
-----------------------------

I've removed most occurrences from package {{optimization}} in revision 1034996.

However, there is a problem with the "MultiStart..." classes: e.g. in {{BaseMultiStartMultivariateVectorialOptimizer}}, line 150, the code catches {{FunctionEvaluationException}}. This contradicts the promise to users that the new {{MathUserException}} won't be caught in the CM code.
Moreover, IMO, the semantics of catching a user-generated exception is too-high level here (i.e. we assume that the exception is "normal" for the user of the multi-start optimizer, whereas it could well be a programming error that will be swallowed by the CM code...). What I mean is that we shouldn't second-guess the user on whether problems in function evaluation are expected or not: multi-start should not be construed as allowing invalid starts.
In that case, the fix is simply to remove the catch block.

What do you think?


> Remove occurences of "FunctionEvaluationException"
> --------------------------------------------------
>
>                 Key: MATH-441
>                 URL: https://issues.apache.org/jira/browse/MATH-441
>             Project: Commons Math
>          Issue Type: Task
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>
> As per the issue MATH-440, {{FunctionEvaluationException}} is now redundant and is going to removed.
> We should remove the "throws" clauses that refer to it from all the methods' signature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.