commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MATH-1179) kolmogorovSmirnovTest poor performance in monteCarloP method
Date Sun, 28 Jun 2015 19:09:04 GMT

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

Thomas Neidhart edited comment on MATH-1179 at 6/28/15 7:08 PM:
----------------------------------------------------------------

{quote}
Nice work improving the Monte Carlo performance. Unfortunately, it is slow to converge as
you may have seen in testing.
{quote}

Do you mean that the improved monte carlo method is slower for some inputs? I did not see
such a behavior while testing, and in fact the method is the same, it is just more efficiently
implemented.

Edit: You mean it requires more iterations now? I did some tests on this and could not see
a significant difference. Can you provide some test for this?

{quote}
I like the API improvement idea; but I don't like having APPROXIMATE as the default unless
it is modified to be smarter than just KS sum based approximation for small samples. See the
discussion in the second reference (http://www.jstatsoft.org/v39/i11/paper) in the class javadoc
for how bad that approximation is for small samples.
{quote}

Edit: Figure 2 in the paper should explain which method to use for which input data.


was (Author: tn):
{quote}
Nice work improving the Monte Carlo performance. Unfortunately, it is slow to converge as
you may have seen in testing.
{quote}

Do you mean that the improved monte carlo method is slower for some inputs? I did not see
such a behavior while testing, and in fact the method is the same, it is just more efficiently
implemented.

Edit: You mean it requires more iterations now? I did some tests on this and could not see
a significant difference. Can you provide some test for this?

{quote}
I like the API improvement idea; but I don't like having APPROXIMATE as the default unless
it is modified to be smarter than just KS sum based approximation for small samples. See the
discussion in the second reference (http://www.jstatsoft.org/v39/i11/paper) in the class javadoc
for how bad that approximation is for small samples.
{quote}

I did previously tests with the methods (using Pelz-Good instead of the ksSum) explained in
the referenced paper, and the results were much better. Unfortunately, one unit-test did fail
afterwards (testTwoSampleApproximateCritialValues), and I did not understand why in this case
it was wrong. The paper also does not mention for which values of n Pelz-Good should be preferred,
and as the one test failed, I was not sure how to continue.

> 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
>             Fix For: 4.0
>
>         Attachments: KSTest-JavaAndR.txt, 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)

Mime
View raw message