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

MillerUpdatingRegression: ArrayIndexOutOfBounds when calling regress with variablesToInclude parameter

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.1
    • Fix Version/s: 4.0
    • Labels:
    • Flags:
      Patch

      Description

      When performing a regression with a subset of predictors, an ArrayIndexOutOfBounds exception will occur for certain subset selections. For example, this appears to happen consistently for regressions without a constant term when the predictor at index 0 is not selected.

      I do not understand at all the algorithm used to reorder the predictors when a subset is requested, but the fix appears to be a simple correction to the indexing range in the for-loop in the regress method of MillerUpdatingRegression.java.

       

      Patch with expanded unit test to follow shortly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cheesinglee Chee Sing Lee
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h