commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evan Ward (JIRA)" <>
Subject [jira] [Commented] (MATH-1105) Least squares statistical data editing
Date Wed, 05 Mar 2014 14:25:43 GMT


Evan Ward commented on MATH-1105:

bq. First patch provides the capability.
Regarding the first patch, is it necessary to introduce a new method "getAcceptedObservations()"?
It would be nicer to consider that the wrapper transparently modifies the problem (by changing
the weights of some observations, or removing them altogether) so that, viewed from the outside,
it would be like a fresh problem was built in the first place (with the modified observations).
For example, one would be able to tell that some observations were deleted by taking the difference
between calls to "getObservationSize()" on the original instance and on the wrapped instance.
Does that make sense?

Getting the number of accepted or rejected observations is the part I am a little unsure of.
The second patch adds  "getAcceptedObservations()" to the Evaluation interface so that data
editing is a simple wrapper.

Since the number of accepted observations can change from one Evaluation to the next, I couldn't
just use LSP.getObservationSize(). Since the current optimizers aren't set up to support a
changing observation size, I didn't want to change the dimension of the residuals or the Jacobian

That left zeroing out the bad data and adding a method to Evaluation to get the number of
accepted/rejected observations. We could rename Evaluation.getAcceptedObservations() to Evaluation.getObservationSize()
if that makes it clearer that it returns the length of the residual vector when there is no
data editing and the number of accepted observations when there is data editing.  E.g.

LeastSquaresProblem lsp = ...;
Optimum optimum = optimizer.optimize(lsp);
double acceptedRatio = optimum.getAcceptedObservations() / lsp.getObservationSize();

Does this answer your question? I'm not sure if I understood correctly.

> Least squares statistical data editing
> --------------------------------------
>                 Key: MATH-1105
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Evan Ward
>         Attachments: 0001-Add-statistical-editing-capability.patch, 0002-Integrate-data-editing-with-the-LS-framework.patch

This message was sent by Atlassian JIRA

View raw message