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

MillerUpdatingRegression: ArrayIndexOutOfBounds when calling regress with variablesToInclude parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.6.1
    • 4.0
    • None
    • 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

              Unassigned Unassigned
              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