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

Sean Owen commented on MAHOUT-687:
----------------------------------

RandomWrapper most certainly does use the map. Look at the use of INSTANCES 
just below it in useTestSeed() which shows its purpose. It needs to reset all 
of the wrappers that have been made. setSeed() may be ignored, and like I've 
said there's an easy fix to that -- new RNG object. I don't see a need to make 
the setSeed() method fail.

I don't have a strong opinion about sharing RNGs per se -- obviously 
correctness is vital, followed by performance, as concerns. So for example I 
think it's reasonable to use an RNG per iterator, yes.

But at the moment I don't know that we have a determinism problem as a result 
of this?


This patch does something different than the first patch, so I think I'm losing 
the plot about what this is out to accomplish?


> Random generator objects- slight refactor
> -----------------------------------------
>
>                 Key: MAHOUT-687
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-687
>             Project: Mahout
>          Issue Type: Improvement
>            Reporter: Lance Norskog
>            Priority: Minor
>         Attachments: MAHOUT-687.patch, MAHOUT-687.patch
>
>
> Problems:
> * Uncommons MersenneTwisterRNG, the default RandomUtils.getRandom(), ignores 
> setSeed without throwing an error.
> * The project wants to move off Uncommons anyway.
> This patch uses the org.apache.commons.math.random.RandomGenerator classes 
> instead of org.apache.uncommons.maths.RepeatableRNG classes.
> Testcases: All math test cases pass except for 
> org.apache.mahout.math.stats.LogLikelihoodTest. 
> Other package tests fail that are mostly about testing random-oriented 
> classes; not a surprise.
> Almost all tests that use random numbers in algorithms still pass; this is a 
> good sign of their stability.
> .
> Still, a lot of tests have to be fiddled to make this commit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to