You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Ted Dunning (JIRA)" <ji...@apache.org> on 2010/05/08 07:56:48 UTC

[jira] Created: (MAHOUT-392) Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal

Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal
-----------------------------------------------------------------------------------------------

                 Key: MAHOUT-392
                 URL: https://issues.apache.org/jira/browse/MAHOUT-392
             Project: Mahout
          Issue Type: Bug
            Reporter: Ted Dunning
             Fix For: 0.4



I need access to the normal distribution to write test cases for random matrices.  While testing that, I found it wasn't quite right so I provided an alternative implementation.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Updated: (MAHOUT-392) Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal

Posted by Ted Dunning <te...@gmail.com>.
You are my hero.

On Wed, May 26, 2010 at 12:15 PM, Sean Owen (JIRA) <ji...@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/MAHOUT-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Sean Owen updated MAHOUT-392:
> -----------------------------
>
>        Status: Resolved  (was: Patch Available)
>    Resolution: Fixed
>
> I committed this
>
> > Test cases for logGamma, Distribution.normal and Distribution.beta, fix
> for Distribution.normal
> >
> -----------------------------------------------------------------------------------------------
> >
> >                 Key: MAHOUT-392
> >                 URL: https://issues.apache.org/jira/browse/MAHOUT-392
> >             Project: Mahout
> >          Issue Type: Bug
> >            Reporter: Ted Dunning
> >             Fix For: 0.4
> >
> >         Attachments: MAHOUT-392.patch
> >
> >
> > I need access to the normal distribution to write test cases for random
> matrices.  While testing that, I found it wasn't quite right so I provided
> an alternative implementation.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Updated: (MAHOUT-392) Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal

Posted by "Ted Dunning (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Dunning updated MAHOUT-392:
-------------------------------

    Status: Patch Available  (was: Open)

> Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal
> -----------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-392
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-392
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.4
>
>
> I need access to the normal distribution to write test cases for random matrices.  While testing that, I found it wasn't quite right so I provided an alternative implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-392) Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865429#action_12865429 ] 

Sean Owen commented on MAHOUT-392:
----------------------------------

I won't argue about it, since it's tiny, but they are not inlined by javac. They may be inlined by a JIT, if/when it decides to compile and optimize the method some time after the method has been used repeatedly. If this were a performance-critical block, I wouldn't rely on this behavior happening at all, or happening to the extent I'd like, and would help the compiler by just doing it by hand. One thing javac can do, strangely, is inline static final primitives. There's a limit to think thinking -- at some point obscuring code by hand isn't worth it.

> Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal
> -----------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-392
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-392
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.4
>
>         Attachments: MAHOUT-392.patch
>
>
> I need access to the normal distribution to write test cases for random matrices.  While testing that, I found it wasn't quite right so I provided an alternative implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-392) Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen updated MAHOUT-392:
-----------------------------

        Status: Resolved  (was: Patch Available)
    Resolution: Fixed

I committed this

> Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal
> -----------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-392
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-392
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.4
>
>         Attachments: MAHOUT-392.patch
>
>
> I need access to the normal distribution to write test cases for random matrices.  While testing that, I found it wasn't quite right so I provided an alternative implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-392) Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865424#action_12865424 ] 

Sean Owen commented on MAHOUT-392:
----------------------------------

Tiny comments:
- You could inline those b0, b1, etc variables for a bit more performance. Or at least make them constants
- Extend .math.MahoutTestCase and also don't forget the copyright block in the unit test

> Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal
> -----------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-392
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-392
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.4
>
>         Attachments: MAHOUT-392.patch
>
>
> I need access to the normal distribution to write test cases for random matrices.  While testing that, I found it wasn't quite right so I provided an alternative implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAHOUT-392) Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal

Posted by "Ted Dunning (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865427#action_12865427 ] 

Ted Dunning commented on MAHOUT-392:
------------------------------------


Regarding the constants, since they are single assignment locals, they will be inlined and treated as constants without anything special done on my part.  As they are, they refer back to the original documentation, so I like keeping the names.

Good reminder on the copyright block.  I need to put the ASL into IntelliJ so that it will automagically do that.



> Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal
> -----------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-392
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-392
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.4
>
>         Attachments: MAHOUT-392.patch
>
>
> I need access to the normal distribution to write test cases for random matrices.  While testing that, I found it wasn't quite right so I provided an alternative implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-392) Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal

Posted by "Ted Dunning (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Dunning updated MAHOUT-392:
-------------------------------

    Attachment: MAHOUT-392.patch

> Test cases for logGamma, Distribution.normal and Distribution.beta, fix for Distribution.normal
> -----------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-392
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-392
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.4
>
>         Attachments: MAHOUT-392.patch
>
>
> I need access to the normal distribution to write test cases for random matrices.  While testing that, I found it wasn't quite right so I provided an alternative implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.