You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Luc Maisonobe (JIRA)" <ji...@apache.org> on 2007/05/18 18:09:16 UTC

[jira] Commented: (MATH-165) Simplify use of "EstimationProblem"

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

Luc Maisonobe commented on MATH-165:
------------------------------------

This seems a great idea to me. It could be easily implemented for 1.2 we are going to release.

> Simplify use of  "EstimationProblem"
> ------------------------------------
>
>                 Key: MATH-165
>                 URL: https://issues.apache.org/jira/browse/MATH-165
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Gilles
>         Assigned To: Luc Maisonobe
>            Priority: Minor
>
> The use of the "EstimationProblem" interface could be simplified by providing a helper (abstract) class that would implement
> the "getMeasurements" "getAllParameters" and "getUnboundParameters" methods.  Currently, each new implementation of the interface has to do it even if they are typically only called from the "Estimator" class (and not by the user code).
> That same helper class could also take care of storing the partial derivatives.
> A skeleton for the requested class could be as follows:
> public abstract class SimpleEstimationProblem
>     implements EstimationProblem {
>     // ... storage for measurements and partial derivatives ...
>  
>     protected void addParameter(EstimatedParameter p,
>                                 ComputableFunction partial,
>                                 boolean isBound) {
>          // ...
>     }
>     protected void addParameter(EstimatedParameter p,
>                                 ComputableFunction partial) {
>         addParameter(p, partial, false);
>     }
>     protected double getPartial(EstimatedParameter p,
>                                 double x) {
>         // ...
>     }
>     protected void addMeasurement(WeightedMeasurement m) {
>         _observations.add(m);
>     }
>     public WeightedMeasurement[] getMeasurements() {
>         // ...
>     }
>     public EstimatedParameter[] getAllParameters() {
>         // ...
>     }
>     public EstimatedParameter[] getUnboundParameters() {
>         // ...
>     }
> }
> Best,
> Gilles

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org