commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikkel Meyer Andersen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-585) Very slow generation of gamma random variates
Date Fri, 10 Jun 2011 05:55:59 GMT

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

Mikkel Meyer Andersen commented on MATH-585:
--------------------------------------------

It is probably possible to gain a bit more by using (reference found in R's ?rexp)
{quote}
Ahrens, J. H. and Dieter, U. (1972).  Computer methods for
sampling from the exponential and normal distributions.
_Communications of the ACM_, *15*, 873-882.
{quote}
instead of the currently simple inversion method to sample from the exponential distribution
(step 8-9).

> Very slow generation of gamma random variates
> ---------------------------------------------
>
>                 Key: MATH-585
>                 URL: https://issues.apache.org/jira/browse/MATH-585
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 2.2, 3.0
>         Environment: All
>            Reporter: Darren Wilkinson
>            Assignee: Mikkel Meyer Andersen
>              Labels: Gamma, Random
>         Attachments: MATH585-1.patch
>
>   Original Estimate: 6h
>  Remaining Estimate: 6h
>
> The current implementation of gamma random variate generation works, but uses an inversion
method. This is well-known to be a bad idea. Usually a carefully constructed rejection procedure
is used. To give an idea of the magnitude of the problem, the Gamma variate generation in
Parallel COLT is roughly 50 times faster than in Commons Math. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message