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)



On 11 January 2015 at 18:22,  <pste...@apache.org> 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 <phil.ste...@gmail.com>
> Authored: Sun Jan 11 11:21:50 2015 -0700
> Committer: Phil Steitz <phil.ste...@gmail.com>
> 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: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to