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

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

Let's tease apart several things going on here.

If you want setSeed() to work on MersenneTwisterRNG, that's easy with a 
different one-line change that makes a new generator. It's not necessarily 
necessary to remove the implementation.

Removing Uncommons Maths is not necessarily a goal, but I'd support it. But 
more than just MersenneTwisterRNG is used in the project, so removing it won't 
let you remove Uncommons Math. So this patch fails to compile. (Side note, I 
would only post a patch if it still makes the project compile and pass tests.)

But then this patch does a bit more. It's replacing seeding based on 
/dev/urandom or SecureRandom with a simple increasing counter. What is the 
reasoning behind that?

> 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
>
>
> 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