[
https://issues.apache.org/jira/browse/MATH-222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ted Dunning updated MATH-222:
-----------------------------
Attachment: MATH-222-with-beta.patch
This is a patch that implements the proposed density computation and adds an
implementation of the beta distribution.
I know that the addition of the beta distribution is a bit out of scope, but I
was going to add that in any case and it would have needed a density method so
it would have depended on this patch. To avoid dependencies, I merged the
changes.
A version of this patch without the beta distribution is also attached to this
issue. If the other patch is put into trunk, I will be happy to submit a
separate patch for the beta distribution.
> Need way to compute density of distributions
> --------------------------------------------
>
> Key: MATH-222
> URL: https://issues.apache.org/jira/browse/MATH-222
> Project: Commons Math
> Issue Type: New Feature
> Reporter: Ted Dunning
> Attachments: MATH-222-with-beta.patch, MATH-222.patch
>
>
> Currently, there are a number of distributions defined in commons math, but
> the interface for Distribution and ContinuousDistribution doesn't provide for
> the computation of the PDF at a particular point.
> It is common for it to be necessary to compute the density function, for
> example in the Metropolis algorithm.
> It is also pretty common for it to be very difficult to compute a density
> function or for the density function to be undefined as certain points. Only
> the cumulative density is mathematically assured.
> Thus, I propose to create a new interface HasDensityFunction<T> that requires
> the implementation of a double density(T) method. T is the type of the
> argument for the density function which would be Double in the case of most
> univariate statistics, but could, for instance, be a vector of doubles for a
> Dirichlet distribution or a vector of integers for a Multinomial.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.