commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Waterman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-460) Levy Distribution
Date Wed, 26 Sep 2012 02:14:08 GMT

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

Andrew Waterman commented on MATH-460:
--------------------------------------

Thanks for the help Phil! Do you think you could explain the following test? It seems like
it should be overridden in my own test case, as I'm a bit confused about the set [250,250,250,250]
for the variable "expected" below: 

  public abstract class RealDistributionAbstractTest {

    ....

    /**
     * Test sampling
     */
    @Test
    public void testSampling() {
        final int sampleSize = 1000;
        distribution.reseedRandomGenerator(1000); // Use fixed seed
        double[] sample = distribution.sample(sampleSize);
        double[] quartiles = TestUtils.getDistributionQuartiles(distribution);
        double[] expected = {250, 250, 250, 250};
        long[] counts = new long[4];
        for (int i = 0; i < sampleSize; i++) {
            TestUtils.updateCounts(sample[i], counts, quartiles);
        }
        TestUtils.assertChiSquareAccept(expected, counts, 0.001);
    }
                
> Levy Distribution
> -----------------
>
>                 Key: MATH-460
>                 URL: https://issues.apache.org/jira/browse/MATH-460
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Pavel Ryzhov
>            Priority: Minor
>             Fix For: 3.2
>
>         Attachments: levy_math_460.patch
>
>
> Pretty straightforward implementation of Levy Distribution (not Levy alpha-stable) according
to http://en.wikipedia.org/wiki/Lévy_distribution.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message