[
https://issues.apache.org/jira/browse/MATH-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14245977#comment-14245977
]
Phil Steitz commented on MATH-1179:
-----------------------------------
As explained in the class javadoc, the default implementation uses the exact
distribution when the product of the sample sizes is less than 200 and a monte
carlo simulation when that product is less than 10000. Both of these are
relatively slow, but more accurate (exact, in the first case) for small samples
than the asymptotic distribution, which R uses for at least the 45-size
samples. For faster results, you can force the asymptotic distribution to be
used. See the class javadoc and the references there for more information on
choice of algorithms, including comments on poor accuracy and stability of the
statistic for small samples and the R implementation.
> kolmogorovSmirnovTest poor performance in monteCarloP method
> ------------------------------------------------------------
>
> Key: MATH-1179
> URL: https://issues.apache.org/jira/browse/MATH-1179
> Project: Commons Math
> Issue Type: Bug
> Reporter: Gilad
> Attachments: KSTestSnippet.txt
>
>
> I'm using the kolmogovSmirnovTest method to calculate pvalues.
> However, when i try running the test on two double[] of sizes 5 and 45 the
> results take over 10 seconds to calculate.
> This seems very long, whereas in R it takes a few miliseconds for the same
> calculation.
> I'd be very happy to hear any comment you may have on the subject.
> Gilad
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)