You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2015/06/28 13:13:04 UTC

[jira] [Commented] (MATH-1179) kolmogorovSmirnovTest poor performance in monteCarloP method

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

Thomas Neidhart commented on MATH-1179:
---------------------------------------

The monte carlo method has been improved in the mean time, see the referenced issue. What remains is to improve the accuracy of the approximateP method and rethink the logic when to select the various methods.

Another approach would be to change the interface of the class to something like that:

{code}
    double kolmogorovSmirnovTest(double[] x, double[] y);
    double kolmogorovSmirnovTest(double[] x, double[] y, boolean strict);
    double kolmogorovSmirnovTest(double[] x, double[] y, boolean strict, Method method);
{code}

where Method is an enum with the values: EXACT, APPROXIMATE, MONTE_CARLO.

The default would call approximate, which is the most reasonable for general use imho (pending that the returned approximate values are improved).

> 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)