You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2020/10/08 21:35:00 UTC

[jira] [Commented] (MATH-1556) KolmogorovSmirnovTest broke between 3.5 and 3.6

    [ https://issues.apache.org/jira/browse/MATH-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17210471#comment-17210471 ] 

Gilles Sadowski commented on MATH-1556:
---------------------------------------

How does the development version behave?

> KolmogorovSmirnovTest broke between 3.5 and 3.6
> -----------------------------------------------
>
>                 Key: MATH-1556
>                 URL: https://issues.apache.org/jira/browse/MATH-1556
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.6, 3.6.1
>            Reporter: Christoph Läubrich
>            Priority: Major
>
> I recently changed a dependency of an existing project from commons.math 3.5 to commons math 3.6 and now getting the following exception:
> {code}Exception in thread "main" 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)
> {code}
> The following code works with 3.5 and fails with 3.6+
> {code}KolmogorovSmirnovTest smirnovTest = new KolmogorovSmirnovTest();
> 		double[] reference = {2.63880347458968E-4, 1.0, 2.638803474589694E-4};
> 		double[] sample = {0.2979181517268306, 1.0, 0.2979181517268308};
> 		double test = smirnovTest.kolmogorovSmirnovTest(reference, sample, false);
> 		System.out.println("test=" + test);{code}The data used here are just an example, I have tested several datasets of our application have many more where it fails so it does not seems to be special to the given input. I have shrieked the datasets as much as possible to reproduce the issue.
> If I use a simple example {code}double[] reference = {1, 1, 1};
> double[] sample = {0.9, 0.9, 0.9};{code} it works in both versions but I get slightly different results:
> 3.6.1 returns test=0.09999999999999998
> 3.5 returns test=0.1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)