[
https://issues.apache.org/jira/browse/MATH-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14043902#comment-14043902
]
Schalk W. Cronjé commented on MATH-1131:
----------------------------------------
This section of code in createH might be part of the problem. A quick test on
my macbook shows that the most of 36 minutes are spent inside there for
d=0.029357223978016822, n=9999. (I specifically tried 9,999 as it was one less
than 10,000).
{code:java}
for (int i = 0; i < m; ++i) {
for (int j = 0; j < i + 1; ++j) {
if (i - j + 1 > 0) {
for (int g = 2; g <= i - j + 1; ++g) {
Hdata[i][j] = Hdata[i][j].divide(g);
}
}
}
}
{code}
> Kolmogorov-Smirnov Tests takes 'forever' on 10,000 item dataset
> ---------------------------------------------------------------
>
> Key: MATH-1131
> URL: https://issues.apache.org/jira/browse/MATH-1131
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.3
> Environment: Java 8
> Reporter: Schalk W. Cronjé
> Attachments: 1.txt, ReproduceKsIssue.groovy, ReproduceKsIssue.java
>
>
> I have code simplified to the following:
> KolmogorovSmirnovTest kst = new KolmogorovSmirnovTest();
> NormalDistribution nd = new NormalDistribution(mean,stddev);
> kst.kolmogorovSmirnovTest(nd,dataset)
> I find that for my dataset of 10,000 items, the call to kolmogorovSmirnovTest
> takes 'forever'. It has not returned after nearly 15minutes and in one my my
> tests has gone over 150MB in memory usage.
--
This message was sent by Atlassian JIRA
(v6.2#6252)