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

SimpleRegression may not report fit statistics correctly for perfect linear models

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • 3.5
    • None
    • None

    Description

      The getSignificance(), getRSquare() and getR() methods can return infinite values when they should return 0, 1 and 1 respectively if the sum of squared errors is exactly 0.

      From Jenkins test run:

      java.lang.AssertionError: expected:<0.0> but was:<Infinity>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotEquals(Assert.java:743)
      	at org.junit.Assert.assertEquals(Assert.java:494)
      	at org.junit.Assert.assertEquals(Assert.java:592)
      	at org.apache.commons.math3.stat.regression.SimpleRegressionTest.testPerfect(SimpleRegressionTest.java:546)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            psteitz Phil Steitz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: