You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Chen Tao (Jira)" <ji...@apache.org> on 2020/01/17 10:23:00 UTC
[jira] [Comment Edited] (MATH-1487) MathInternalError - Kolmogorov
Smirnov Test
[ https://issues.apache.org/jira/browse/MATH-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17017882#comment-17017882 ]
Chen Tao edited comment on MATH-1487 at 1/17/20 10:22 AM:
----------------------------------------------------------
I can not reproduce this bug both in 3.6.1 and development version, by this code:
```java
@Testpublic void testCase() throws IOException
{ double[] alpha = readToDoubleArray("alpha.arr"); double[] beta = readToDoubleArray("beta.arr"); KolmogorovSmirnovTest kolmogorovSmirnovTest = new KolmogorovSmirnovTest(); kolmogorovSmirnovTest.kolmogorovSmirnovTest(alpha, beta); }
private double[] readToDoubleArray(final String filename) throws IOException
{ return Files.readAllLines(Paths.get("path", "to", "arrays", filename)) .stream() .mapToDouble(Double::parseDouble) .toArray(); }
```
More information should be provide.
was (Author: chentao106):
I can not reproduce this bug both in 3.6.1 and development version, by this code:
@Testpublic void testCase() throws IOException { double[] alpha = readToDoubleArray("alpha.arr"); double[] beta = readToDoubleArray("beta.arr");
KolmogorovSmirnovTest kolmogorovSmirnovTest = new KolmogorovSmirnovTest();
kolmogorovSmirnovTest.kolmogorovSmirnovTest(alpha, beta);
}private double[] readToDoubleArray(final String filename) throws IOException { return Files.readAllLines(Paths.get("path", "to", "arrays", filename))
.stream()
.mapToDouble(Double::parseDouble)
.toArray();
}
More information should be provide.
> MathInternalError - Kolmogorov Smirnov Test
> -------------------------------------------
>
> Key: MATH-1487
> URL: https://issues.apache.org/jira/browse/MATH-1487
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.6.1
> Reporter: Paweł Lipiński
> Priority: Critical
> Attachments: alpha.arr, beta.arr
>
>
> Hi,
> I spotted a pesky bug in KolmogorovSmirnovTest class, in the method kolmogorovSmirnovTest.
> In order to reproduce the error use arrays from attachments.
> Stacktrace:
> {noformat}
> org.apache.commons.math3.exception.MathInternalError: illegal state: internal error, please fill a bug report at https://issues.apache.org/jira/browse/MATH
> at org.apache.commons.math3.stat.inference.KolmogorovSmirnovTest.fixTies(KolmogorovSmirnovTest.java:1171)
> at org.apache.commons.math3.stat.inference.KolmogorovSmirnovTest.kolmogorovSmirnovTest(KolmogorovSmirnovTest.java:263)
> at org.apache.commons.math3.stat.inference.KolmogorovSmirnovTest.kolmogorovSmirnovTest(KolmogorovSmirnovTest.java:290)
> {noformat}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)