On 1/12/15 11:09 AM, sebb wrote:
> On H10 this fails with
>
> testPerfect2(org.apache.commons.math3.stat.regression.SimpleRegressionTest)
>  Time elapsed: 0 sec  <<< FAILURE!
> 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.testPerfect2(SimpleRegressionTest.java:558)


Right.  I added it to rule out my original hypothesis, which was
that H10 was getting exact 0 for SSE and that was causing the
problem.  The fact that this succeeds on other JDKs / platforms
means that the problem is not likely in this class; but in the t
distribution computation.

Phil
>
>
>
> On 11 January 2015 at 18:22,  <[email protected]> wrote:
>> Repository: commons-math
>> Updated Branches:
>>   refs/heads/master 61f3eba79 -> 5e6f4f18f
>>
>>
>> Added a simpler perfect fit test that verifies slope standard error 
>> identically 0.
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/5e6f4f18
>> Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/5e6f4f18
>> Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/5e6f4f18
>>
>> Branch: refs/heads/master
>> Commit: 5e6f4f18ff315825284d697adc1d721983da8693
>> Parents: 61f3eba
>> Author: Phil Steitz <[email protected]>
>> Authored: Sun Jan 11 11:21:50 2015 -0700
>> Committer: Phil Steitz <[email protected]>
>> Committed: Sun Jan 11 11:21:50 2015 -0700
>>
>> ----------------------------------------------------------------------
>>  .../math3/stat/regression/SimpleRegressionTest.java      | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>> ----------------------------------------------------------------------
>>
>>
>> http://git-wip-us.apache.org/repos/asf/commons-math/blob/5e6f4f18/src/test/java/org/apache/commons/math3/stat/regression/SimpleRegressionTest.java
>> ----------------------------------------------------------------------
>> diff --git 
>> a/src/test/java/org/apache/commons/math3/stat/regression/SimpleRegressionTest.java
>>  
>> b/src/test/java/org/apache/commons/math3/stat/regression/SimpleRegressionTest.java
>> index 51b23d6..063e06b 100644
>> --- 
>> a/src/test/java/org/apache/commons/math3/stat/regression/SimpleRegressionTest.java
>> +++ 
>> b/src/test/java/org/apache/commons/math3/stat/regression/SimpleRegressionTest.java
>> @@ -547,6 +547,17 @@ public final class SimpleRegressionTest {
>>          Assert.assertTrue(regression.getSlope() > 0.0);
>>          Assert.assertTrue(regression.getSumSquaredErrors() >= 0.0);
>>      }
>> +
>> +    @Test
>> +    public void testPerfect2() {
>> +        SimpleRegression regression = new SimpleRegression();
>> +        regression.addData(0, 0);
>> +        regression.addData(1, 1);
>> +        regression.addData(2, 2);
>> +        Assert.assertEquals(0.0, regression.getSlopeStdErr(), 0.0);
>> +        Assert.assertEquals(0.0, regression.getSignificance(), 
>> Double.MIN_VALUE);
>> +        Assert.assertEquals(1, regression.getRSquare(), Double.MIN_VALUE);
>> +    }
>>
>>      @Test
>>      public void testPerfectNegative() {
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to