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

SimpleRegression may not report fit statistics correctly for perfect linear models

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment