commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [math] Distributions over sample spaces other than R
Date Sun, 06 Nov 2011 17:06:17 GMT
On 11/5/11 12:11 PM, cwinter wrote:
> Hi,
> I'm picking up the discussion on the interface structure for distributions
> again.
> Now there is consensus on having separate roots for each domain: one for
> real-valued distributions and one for integer distributions.
> After thinking once more about distributions with densities vs. those
> without, I agree that two interfaces for the real domain are not necessary,
> and we should go for simplicity. For distributions not having a density, the
> implementation of density(double) could provide results being as meaningful
> as possible. It could return infinity (where the distribution has "discrete
> points" - as proposed by S├ębastien on another thread
> or something else seeming to be appropriate (where there is another reason
> for the actual density not to exist).

+1 - just need to document clearly what is going on if and when we
implement such things.
> The naming issue is still open. In my opion, a name containing the name of
> the distribution's domain (instead of a property) helps to avoid ambiguity
> and funny curiosities (A random sample of a normal distribution is
> associated with a *discrete* empirical distribution which approximately
> renders the according normal distribution. However, the sample's
> distribution would implement the interface for the real domain. Thus the
> interface for the integer domain should not have the name
> DiscreteDistribution.). Additionally, it would be easier to provide more
> roots if users require support for further domains (e.g. if a multidimension
> normal distribution shall be implemented).

I was resisting this before, wanting to stay with the conventional
continuous/discrete naming; but you have convinced me
"IntegerDistribution" is better for the discrete case.  I guess the
logical name to use for the continuous case is "RealDistribution."  
That leaves open "MultivariateXxDistribution" which we could add later.

Assuming there are no objections to this approach, it would be great
if you could create a JIRA for this and attach a patch taking a stab
at it.

> Christian
> --
> View this message in context:
> Sent from the Commons - Dev mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message