[ 
https://issues.apache.org/jira/browse/MATH-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Phil Steitz updated MATH-1189:
------------------------------
    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:
{code}
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)
{code}

  was: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.


> SimpleRegression may not report fit statistics correctly for perfect linear 
> models
> ----------------------------------------------------------------------------------
>
>                 Key: MATH-1189
>                 URL: https://issues.apache.org/jira/browse/MATH-1189
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Phil Steitz
>
> 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:
> {code}
> 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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to