You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Mikkel Meyer Andersen <mi...@mikl.dk> on 2010/09/23 10:36:39 UTC

[MATH] Updated: (MATH-385) Characteristic (support, mean, variance, ...) on Distributions

Hi,

I've also finally made a patch proposal for MATH-385 (
https://issues.apache.org/jira/browse/MATH-385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
) . Sorry for the delay on this one, too.

I haven't added any tests yet; I'd like to hear the opinion about the
logic before creating the testing functions. In addition, it would be
very appreciated if anybody had proposals to which tests to make.

Cheers, Mikkel.

---------- Forwarded message ----------
From: Mikkel Meyer Andersen (JIRA) <ji...@apache.org>
Date: 2010/9/22
Subject: [jira] Updated: (MATH-385) Characteristic (support, mean,
variance, ...) on Distributions
To: mikl@mikl.dk



    [ https://issues.apache.org/jira/browse/MATH-385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mikkel Meyer Andersen updated MATH-385:
---------------------------------------

   Attachment: MATH385-PATCH1

Patch proposal for the logic.

I haven't added any tests yet; I'd like to hear the opinion about the
logic before creating the testing functions.

> Characteristic (support, mean, variance, ...) on Distributions
> --------------------------------------------------------------
>
>                 Key: MATH-385
>                 URL: https://issues.apache.org/jira/browse/MATH-385
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Mikkel Meyer Andersen
>             Fix For: 2.2
>
>         Attachments: MATH385-PATCH1
>
>   Original Estimate: 5h
>  Remaining Estimate: 5h
>
> I wish that the Distributions could contain some characteristics. For example support, mean, and variance.
> Support:
> AbstractContinuousDistribution and AbstractIntegerDistribution should have double getSupport{Lower, Upper}Bound() and int getSupport{Lower, Upper}Bound(), respectively. Also methods a la boolean isSupport{Lower, Upper}BoundInclusive() on AbstractContinuousDistribution should reflect if the support is open of closed. In practise the implemented distributions are easy since the support for all continuous distributions are real intervals (connected sets), and the support for all the discrete distributions are connected integer sets. This means that the lower and upper bound (together with isSupport{Lower, Upper}BoundInclusive() on AbstractContinuousDistribution because it is not needed on the discrete distributions because of their nature) are sufficient for determine the support.
> Mean and variance:
> double get{Mean, Variance}() should be on AbstractDistribution.
> With such characteristic an invalidateParameters-method might come in handy because they often depend on the parameters. The characteristics should not be calculated before the first time they are get'ted, and when calculated, they should be saved for later use.  When parameters change, an invalidateParameters-method should be called to force the characteristics to be recalculated.
> Values such as Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, and Double.NaN should be used where appropriate.

--
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-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org