2010/11/16  <luc.maison...@free.fr>:
>
> ----- "Mikkel Meyer Andersen" <m...@mikl.dk> a écrit :
>
>> Dear developers,
>
> Hi Mikkel,
>
>>
>> We now have a working implementation of the cdf for the two-sided
>> Kolmogorov Smirnov Distribution [1]. What do you think about it? Now
>> both rounding (RealMatrix and its cousins) and exact (using
>> BigFraction and its cousins) are provided - the exact should only be
>> used for verification purposes because its way too slow in practise.
>> Should the exact be removed or should be JavaDoc just reflect this
>> fact clearly? I like it being there - it also gives the user to
>> possibility to use it for e.g. n <= 50. On the negative side, two
>> pow-functions are required (no common superclass for FieldMatrix<T>
>> and RealMatrix providing multiply-functionality - unfortunately).
>
> Two implementations are a good thing. I guess some users would be happy with 
> an accurate one even if it is slow.
> Concerning RealMatrix/FieldMatrix, I would be happy to have more code shared, 
> but I was not able to do that (well, we could of course extend the Double 
> class to implement FieldElement, but that I guess that would be really slow).
Yeah - I also tried superclass'ing/interface'ing a bit yesterday
without any luck. I agree that Double would probably be too slow.
Maybe others have suggestions because the almost duplicate code at the
moment is not very nice?

Cheers, Mikkel.
>
> regards,
> Luc
>
>>
>> Cheers, Mikkel.
>>
>> [1]: https://issues.apache.org/jira/browse/MATH-437
>>
>> ---------- Forwarded message ----------
>> From: Mikkel Meyer Andersen (JIRA) <j...@apache.org>
>> Date: 2010/11/16
>> Subject: [jira] Commented: (MATH-437) Kolmogorov Smirnov Distribution
>> To: m...@mikl.dk
>>
>>
>>
>>    [
>> https://issues.apache.org/jira/browse/MATH-437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932361#action_12932361
>> ]
>>
>> Mikkel Meyer Andersen commented on MATH-437:
>> --------------------------------------------
>>
>> The last part of the roundedK kan be replaced with
>> {{
>> double pFrac = Hpower.getEntry(k - 2, k - 2);
>>
>> for (int i = 1; i <= n; ++i) {
>>        pFrac *= (double)i / (double)n;
>> }
>>
>> return pFrac;
>> }}
>> to get even better running time and still precise results:
>> {{
>> F(n, x) = F(200, 0.02):
>>                                 Lecuyer (3.0 ms.) =
>> 5.151982014280042E-6
>>   KolmogorovSmirnovDistribution exact (760.0 ms.) =
>> 5.15198201428005E-6
>>   KolmogorovSmirnovDistribution !exact (16.0 ms.) =
>> 5.151982014280049E-6
>> -------------------------
>>
>>
>> F(n, x) = F(200, 0.031111):
>>                                 Lecuyer (2.0 ms.) =
>> 0.012916146481628863
>>  KolmogorovSmirnovDistribution exact (51902.0 ms.) =
>> 0.012149763742041911
>>    KolmogorovSmirnovDistribution !exact (9.0 ms.) =
>> 0.012149763742041922
>> -------------------------
>>
>>
>> F(n, x) = F(200, 0.04):
>>                                 Lecuyer (0.0 ms.) =
>> 0.1067121882956352
>>  KolmogorovSmirnovDistribution exact (5903.0 ms.) =
>> 0.10671370113626812
>>    KolmogorovSmirnovDistribution !exact (6.0 ms.) =
>> 0.10671370113626813
>> -------------------------
>> }}
>>
>> > Kolmogorov Smirnov Distribution
>> > -------------------------------
>> >
>> >                 Key: MATH-437
>> >                 URL: https://issues.apache.org/jira/browse/MATH-437
>> >             Project: Commons Math
>> >          Issue Type: New Feature
>> >            Reporter: Mikkel Meyer Andersen
>> >            Assignee: Mikkel Meyer Andersen
>> >            Priority: Minor
>> >         Attachments: KolmogorovSmirnovDistribution.java
>> >
>> >   Original Estimate: 0.25h
>> >  Remaining Estimate: 0.25h
>> >
>> > Kolmogorov-Smirnov test (see [1]) is used to test if one sample
>> against a known probability density functions or if two samples are
>> from the same distribution. To evaluate the test statistic, the
>> Kolmogorov-Smirnov distribution is used. Quite good asymptotics exist
>> for the one-sided test, but it's more difficult for the two-sided
>> test.
>> > [1]: http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>> For additional commands, e-mail: dev-h...@commons.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to