Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-377

weight versus sigma in AbstractLeastSquares

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Labels:
      None

      Description

      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);}

        Attachments

        1. Math377fix.diff
          2 kB
          Dimitri Pourbaix

          Activity

            People

            • Assignee:
              dimpbx Dimitri Pourbaix
              Reporter:
              dimpbx Dimitri Pourbaix
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified