[
https://issues.apache.org/jira/browse/MATH-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luc Maisonobe resolved MATH-200.
--------------------------------
Resolution: Fixed
I finally changed my mind and limited the results of both methods to unbound
parameters only.
This is more compliant with what user can expect when they bind parameters (a
problem with bound parameters should behave exactly as if these parameters were
simply constants).
The previous javadoc was not clear about this and the methods did not work at
all in this case, so such a change seems wiser to me.
> AbstractEstimator: getCovariances() and guessParametersErrors() crash when
> having bound parameters
> --------------------------------------------------------------------------------------------------
>
> Key: MATH-200
> URL: https://issues.apache.org/jira/browse/MATH-200
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Plamen Petrov
> Assignee: Luc Maisonobe
> Priority: Critical
>
> the two methods getCovariances() and guessParametersErrors() from
> org.apache.commons.math.estimation.AbstractEstimator crash with
> ArrayOutOfBounds exception when some of the parameters are bound. The reason
> is that the Jacobian is calculated only for the unbound parameters. in the
> code you loop through all parameters.
> line #166: final int cols = problem.*getAllParameters()*.length;
> should be replaced by: final int cols =
> problem.*getUnboundParameters()*.length;
> (similar changes could be done in guessParametersErrors())
> the dissadvantage of the above bug fix is that what is returned to the user
> is an array with smaller size than the number of all parameters.
> Alternatively, you can have some logic in the code which writes zeros for the
> elements of the covariance matrix corresponding to the bound parameters
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.