Return-Path: X-Original-To: apmail-mahout-dev-archive@www.apache.org Delivered-To: apmail-mahout-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0220A39F0 for ; Fri, 6 May 2011 07:59:46 +0000 (UTC) Received: (qmail 55823 invoked by uid 500); 6 May 2011 07:59:45 -0000 Delivered-To: apmail-mahout-dev-archive@mahout.apache.org Received: (qmail 55797 invoked by uid 500); 6 May 2011 07:59:45 -0000 Mailing-List: contact dev-help@mahout.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mahout.apache.org Delivered-To: mailing list dev@mahout.apache.org Received: (qmail 55789 invoked by uid 99); 6 May 2011 07:59:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2011 07:59:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2011 07:59:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2502BC35D5 for ; Fri, 6 May 2011 07:59:03 +0000 (UTC) Date: Fri, 6 May 2011 07:59:03 +0000 (UTC) From: "Lance Norskog (JIRA)" To: dev@mahout.apache.org Message-ID: <801326244.27546.1304668743148.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <888004344.23670.1304573943158.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MAHOUT-687) Random generator objects- slight refactor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MAHOUT-687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029815#comment-13029815 ] Lance Norskog commented on MAHOUT-687: -------------------------------------- bq. If you want setSeed() to work on MersenneTwisterRNG, that's easy with a different one-line change that makes a new generator. A deterministic random matrix or vector needs to set the seed for each multiply. This fix would create too much garbage. (Each MersenneTwister has 2500 bytes!) Once you say you need Commons MersenneTwister instead, because it has a setSeed(long), the rest of the patch ticks over. bq. Removing Uncommons Maths is not necessarily a goal, but I'd support it. Other chatter on the list talked about pushing uncommons out completely. One step at a time. bq. It's replacing seeding based on /dev/urandom or SecureRandom with a simple increasing counter. Oops- thought I changed that back. . The patch is clearly not finished. If a test fails because it relies on a deterministic result, that's easy to fix. If a test fails otherwise, probably the test does not supply enough data points for the algorithm to function. From a quick look, LogLikelihoodTest may have this problem. > 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