Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page)
------------------------------------------------------------------------------------------------------------------- Key: MATH-311 URL: https://issues.apache.org/jira/browse/MATH-311 Project: Commons Math Issue Type: Improvement Reporter: Nipun Jawalkar Priority: Minor The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770647#action_12770647 ] Nipun Jawalkar edited comment on MATH-311 at 10/27/09 9:18 PM: --------------------------------------------------------------- Patch to update both BinomialDistributionImpl.java as well as the matching unit test, BinomialDistributionTest.java was (Author: njawalkar): Path to update both BinomialDistributionImpl.java as well as the matching unit test, BinomialDistributionTest.java > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nipun Jawalkar updated MATH-311: -------------------------------- Attachment: BinomialDistributionPatch.txt Path to update both BinomialDistributionImpl.java as well as the matching unit test, BinomialDistributionTest.java > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770976#action_12770976 ] Brent Worden commented on MATH-311: ----------------------------------- Thanks for the contribution. This definitely improves the implementation. If I may be so bold, I would prefer the utility methods you have created, stirlerr and bd0, be placed in their own utility class. That way, those methods and this technique can more easily be leveraged by other distributions. What do other committers think? > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770976#action_12770976 ] Brent Worden edited comment on MATH-311 at 10/28/09 5:15 PM: ------------------------------------------------------------- Thanks for the contribution. This definitely improves the implementation. If I may be so bold, I would prefer the utility methods you have created, stirlerr and bd0, be placed in their own utility class. That way, those methods and this technique can more easily be leveraged by other distributions. What do others think? was (Author: brentworden): Thanks for the contribution. This definitely improves the implementation. If I may be so bold, I would prefer the utility methods you have created, stirlerr and bd0, be placed in their own utility class. That way, those methods and this technique can more easily be leveraged by other distributions. What do other think? > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770976#action_12770976 ] Brent Worden edited comment on MATH-311 at 10/28/09 5:15 PM: ------------------------------------------------------------- Thanks for the contribution. This definitely improves the implementation. If I may be so bold, I would prefer the utility methods you have created, stirlerr and bd0, be placed in their own utility class. That way, those methods and this technique can more easily be leveraged by other distributions. What do other think? was (Author: brentworden): Thanks for the contribution. This definitely improves the implementation. If I may be so bold, I would prefer the utility methods you have created, stirlerr and bd0, be placed in their own utility class. That way, those methods and this technique can more easily be leveraged by other distributions. What do other committers think? > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771066#action_12771066 ] Luc Maisonobe commented on MATH-311: ------------------------------------ I agree with Brent. > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brent Worden resolved MATH-311. ------------------------------- Resolution: Fixed Fix Version/s: 2.1 - Made the SaddlePointExpansion (probably not the best name) utility class that implements Catheline Loader's saddle point expansion approximation. - Utilized this new class in the Binomial, Hypergeometric, and Poisson distributions. - Updated the Binomial test cases with the data provided by Nipun. Changes are all checked in and critiques are welcome. > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Fix For: 2.1 > > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771135#action_12771135 ] Luc Maisonobe commented on MATH-311: ------------------------------------ Thanks to Nipun for the contribution and to Brent for the checking. I have checked in minor editions to fix checkstyle and findbugs errors. > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Fix For: 2.1 > > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by ASF GitHub Bot (Jira)
[ https://issues.apache.org/jira/browse/MATH-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz closed MATH-311. ---------------------------- > Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page) > ------------------------------------------------------------------------------------------------------------------- > > Key: MATH-311 > URL: https://issues.apache.org/jira/browse/MATH-311 > Project: Commons Math > Issue Type: Improvement > Reporter: Nipun Jawalkar > Priority: Minor > Fix For: 2.1 > > Attachments: BinomialDistributionPatch.txt > > > The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf > I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |