You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2010/06/19 21:12:25 UTC

[jira] Commented: (MATH-377) weight versus sigma in AbstractLeastSquares

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

Phil Steitz commented on MATH-377:
----------------------------------

It is not clear to me exactly what is being computed in getChiSquare.  Step 0 is to get an actual definition in the javadoc for what it is trying to compute.  I agree it seems odd to be dividing by residual weights; but I could be missing the intent.

> weight versus sigma in AbstractLeastSquares
> -------------------------------------------
>
>                 Key: MATH-377
>                 URL: https://issues.apache.org/jira/browse/MATH-377
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Dimitri Pourbaix
>             Fix For: 2.2
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> In AbstractLeastSquares, residualsWeights contains the WEIGHTS assigned to each observation.  In the method getRMS(), these weights are multiplicative as they should. unlike in getChiSquare() where it appears at the denominator!   If the weight is really the weight of the observation, it should multiply the square of the residual even in the computation of the chi2.
>  Once corrected, getRMS() can even reduce
>  public double getRMS() {return Math.sqrt(getChiSquare()/rows);}

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