[jira] [Commented] (MATH-1039) Logarithmic probability and density calculations for the distributions

2013-10-21 Thread Aleksei Dievskii (JIRA)

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

Aleksei Dievskii commented on MATH-1039:


You're welcome!

> Logarithmic probability and density calculations for the distributions
> --
>
> Key: MATH-1039
> URL: https://issues.apache.org/jira/browse/MATH-1039
> Project: Commons Math
>  Issue Type: New Feature
>Reporter: Aleksei Dievskii
>Assignee: Phil Steitz
>Priority: Minor
>  Labels: features, patch
> Fix For: 4.0
>
> Attachments: LOGDENSITY.patch
>
>
> A person working with fairly small probabilities and densities often employs 
> their logarithms to increase precision and decrease the chance of an 
> underflow. However, just taking a log of the probability() or density() 
> return value doesn't necessarily solve the problem, as these methods 
> themselves could have lost precision or underflowed. This patch introduces 
> new logProbability() and logDensity() methods overriden for many relevant 
> distribution. The patch also introduces tests of these new methods.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (MATH-1039) Logarithmic probability and density calculations for the distributions

2013-10-16 Thread Aleksei Dievskii (JIRA)

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

Aleksei Dievskii commented on MATH-1039:


2.14.1, though I don't think that they changed these functions in the next 
release.

> Logarithmic probability and density calculations for the distributions
> --
>
> Key: MATH-1039
> URL: https://issues.apache.org/jira/browse/MATH-1039
> Project: Commons Math
>  Issue Type: New Feature
>Reporter: Aleksei Dievskii
>Priority: Minor
>  Labels: features, patch
> Attachments: LOGDENSITY.patch
>
>
> A person working with fairly small probabilities and densities often employs 
> their logarithms to increase precision and decrease the chance of an 
> underflow. However, just taking a log of the probability() or density() 
> return value doesn't necessarily solve the problem, as these methods 
> themselves could have lost precision or underflowed. This patch introduces 
> new logProbability() and logDensity() methods overriden for many relevant 
> distribution. The patch also introduces tests of these new methods.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (MATH-1039) Logarithmic probability and density calculations for the distributions

2013-10-15 Thread Phil Steitz (JIRA)

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

Phil Steitz commented on MATH-1039:
---

Thanks!  What version of R?

> Logarithmic probability and density calculations for the distributions
> --
>
> Key: MATH-1039
> URL: https://issues.apache.org/jira/browse/MATH-1039
> Project: Commons Math
>  Issue Type: New Feature
>Reporter: Aleksei Dievskii
>Priority: Minor
>  Labels: features, patch
> Attachments: LOGDENSITY.patch
>
>
> A person working with fairly small probabilities and densities often employs 
> their logarithms to increase precision and decrease the chance of an 
> underflow. However, just taking a log of the probability() or density() 
> return value doesn't necessarily solve the problem, as these methods 
> themselves could have lost precision or underflowed. This patch introduces 
> new logProbability() and logDensity() methods overriden for many relevant 
> distribution. The patch also introduces tests of these new methods.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (MATH-1039) Logarithmic probability and density calculations for the distributions

2013-10-15 Thread Aleksei Dievskii (JIRA)

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

Aleksei Dievskii commented on MATH-1039:


1. I didn't know that interfaces couldn't be changed outside a major release. 
Of course, keeping the changes to abstract parents will cover the immediate 
needs.
2. The reference data come from R (so I just haven't changed the overall 
testing data disclaimer). I used the standard density functions (dpois, dnorm 
and so on) with log=TRUE argument.

> Logarithmic probability and density calculations for the distributions
> --
>
> Key: MATH-1039
> URL: https://issues.apache.org/jira/browse/MATH-1039
> Project: Commons Math
>  Issue Type: New Feature
>Reporter: Aleksei Dievskii
>Priority: Minor
>  Labels: features, patch
> Attachments: LOGDENSITY.patch
>
>
> A person working with fairly small probabilities and densities often employs 
> their logarithms to increase precision and decrease the chance of an 
> underflow. However, just taking a log of the probability() or density() 
> return value doesn't necessary solve the problem, as these methods themselves 
> could have lost precision or underflowed. This patch introduces new 
> logProbability() and logDensity() methods overriden for many relevant 
> distribution. The patch also introduces tests of these new methods.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (MATH-1039) Logarithmic probability and density calculations for the distributions

2013-10-14 Thread Phil Steitz (JIRA)

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

Phil Steitz commented on MATH-1039:
---

This looks very good and useful.  Thanks for the patch!  Just a couple of quick 
comments and I can commit.

1. For 3.3 we can't add to the interfaces, so I suggest to add impls to the 
abstract parents and hold the add to the interfaces until 4.0.  Unless someone 
screams, I will do that (so just omit the changes to the distribution 
interfaces)
2. Thanks so much for the careful job on the test cases.  Where does the 
reference data come from?  I like to include the source of reference data where 
possible.


> Logarithmic probability and density calculations for the distributions
> --
>
> Key: MATH-1039
> URL: https://issues.apache.org/jira/browse/MATH-1039
> Project: Commons Math
>  Issue Type: New Feature
>Reporter: Aleksei Dievskii
>Priority: Minor
>  Labels: features, patch
> Attachments: LOGDENSITY.patch
>
>
> A person working with fairly small probabilities and densities often employs 
> their logarithms to increase precision and decrease the chance of an 
> underflow. However, just taking a log of the probability() or density() 
> return value doesn't necessary solve the problem, as these methods themselves 
> could have lost precision or underflowed. This patch introduces new 
> logProbability() and logDensity() methods overriden for many relevant 
> distribution. The patch also introduces tests of these new methods.



--
This message was sent by Atlassian JIRA
(v6.1#6144)