[
https://issues.apache.org/jira/browse/MATH-1535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17118940#comment-17118940
]
Steffen Herbold commented on MATH-1535:
---------------------------------------
Here is the stacktrace:
{code:java}
org.apache.commons.math4.exception.MathInternalError: illegal state: internal
error, please fill a bug report at
https://issues.apache.org/jira/browse/MATHorg.apache.commons.math4.exception.MathInternalError:
illegal state: internal error, please fill a bug report at
https://issues.apache.org/jira/browse/MATH at
org.apache.commons.math4.stat.inference.KolmogorovSmirnovTest.fixTies(KolmogorovSmirnovTest.java:1099)
at
org.apache.commons.math4.stat.inference.KolmogorovSmirnovTest.kolmogorovSmirnovTest(KolmogorovSmirnovTest.java:211)
at
org.apache.commons.math4.stat.inference.KolmogorovSmirnovTest.kolmogorovSmirnovTest(KolmogorovSmirnovTest.java:238)
at
org.apache.commons.math4.stat.inference.KolmogorovSmirnovTestTest.testMath1535(KolmogorovSmirnovTestTest.java:813)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566) at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at
org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at
org.junit.runners.ParentRunner.run(ParentRunner.java:309) at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209){code}
> MathInternalError in KolmogorovSmirnovTest in case of many ties
> ---------------------------------------------------------------
>
> Key: MATH-1535
> URL: https://issues.apache.org/jira/browse/MATH-1535
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.6.1
> Environment: commons-math 3.6.1, oracle jdk11 for windows
> Reporter: Steffen Herbold
> Priority: Major
>
> I encounter a math internal error with some very ugly data that has lots of
> ties. The code below triggers the exception. I could try to build in a
> detection in my code that identifies this strange case where the generated
> data has many ties, to avoid this. But I guess the MathInternalError in
> commons-math should still be avoided.
>
> {code:java}
> // works
> double[] sample1 = new double[] {0.8767630865438496, 0.9998809418147052,
> 0.9999999715463531, 0.9999985849345421};
> double[] sample2 = new double[] {1.0, 1.0, 1.0, 1.0};
> ksTest.kolmogorovSmirnovTest(sample1, sample2);
> // fails with illegal state
> double[] sample3 = new double[] {0.8767630865438496, 0.9998809418147052,
> 0.9999999715463531, 0.9999985849345421, 0.973584315883326,
> 0.9999999875782982, 0.999999999999994, 0.9999999999908233, 1.0,
> 0.9999999890925574, 0.9999998345734327, 0.9999999350772448,
> 0.999999999999426, 0.9999147040688201, 0.9999999999999922, 1.0, 1.0,
> 0.9919050954798272, 0.8649014770687263, 0.9990869497973084,
> 0.9993222540990464, 0.999999999998189, 0.9999999999999365,
> 0.9790934801762917, 0.9999578695006303, 0.9999999999999998,
> 0.999999999996166, 0.9999999999995546, 0.9999999999908036, 0.99999999999744,
> 0.9999998802655555, 0.9079334221214075, 0.9794398308007372,
> 0.9999044231134367, 0.9999999999999813, 0.9999957841707683,
> 0.9277678892094009, 0.999948269893843, 0.9999999886132888,
> 0.9999998909699096, 0.9999099536620326, 0.9999999962217623,
> 0.9138936987350447, 0.9999999999779976, 0.999999999998822, 0.999979247207911,
> 0.9926904388316407, 1.0, 0.9999999999998814, 1.0, 0.9892505696426215,
> 0.9999996514123723, 0.9999999999999429, 0.9999999995399116,
> 0.999999999948221, 0.7358264887843119, 0.9999999994098534, 1.0,
> 0.9999986456748472, 1.0, 0.9999999999921501, 0.9999999999999996,
> 0.9999999999999944, 0.9473070068606853, 0.9993714060209042,
> 0.9999999409098718, 0.9999999592791519, 0.9999999999999805};
> double[] sample4 = new double[] {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
> 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
> 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
> 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
> 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
> 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
> 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
> 1.0};
> ksTest.kolmogorovSmirnovTest(sample3, sample4);
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)