Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 53586 invoked from network); 2 Sep 2008 08:19:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Sep 2008 08:19:37 -0000 Received: (qmail 2379 invoked by uid 500); 2 Sep 2008 08:19:34 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 2285 invoked by uid 500); 2 Sep 2008 08:19:33 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 2274 invoked by uid 99); 2 Sep 2008 08:19:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 01:19:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 08:18:44 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F213B234C1DE for ; Tue, 2 Sep 2008 01:18:44 -0700 (PDT) Message-ID: <1002381555.1220343524990.JavaMail.jira@brutus> Date: Tue, 2 Sep 2008 01:18:44 -0700 (PDT) From: "Ted Dunning (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (MATH-222) Need way to compute density of distributions In-Reply-To: <477253141.1220310284318.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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 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.