Return-Path: X-Original-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C30236914 for ; Fri, 24 Jun 2011 09:25:11 +0000 (UTC) Received: (qmail 44882 invoked by uid 500); 24 Jun 2011 09:25:11 -0000 Delivered-To: apmail-incubator-hama-dev-archive@incubator.apache.org Received: (qmail 44760 invoked by uid 500); 24 Jun 2011 09:25:09 -0000 Mailing-List: contact hama-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hama-dev@incubator.apache.org Delivered-To: mailing list hama-dev@incubator.apache.org Received: (qmail 44752 invoked by uid 99); 24 Jun 2011 09:25:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 09:25:08 +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, 24 Jun 2011 09:25:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8AD4F42D40D for ; Fri, 24 Jun 2011 09:24:47 +0000 (UTC) Date: Fri, 24 Jun 2011 09:24:47 +0000 (UTC) From: "Thomas Jungblut (JIRA)" To: hama-dev@incubator.apache.org Message-ID: <2006572448.36172.1308907487565.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1889304490.36146.1308906770931.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HAMA-406) Pagerank wrong ALPHA MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HAMA-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054322#comment-13054322 ] Thomas Jungblut commented on HAMA-406: -------------------------------------- Okay was already commited by edward. Thanks. > Pagerank wrong ALPHA > -------------------- > > Key: HAMA-406 > URL: https://issues.apache.org/jira/browse/HAMA-406 > Project: Hama > Issue Type: Bug > Reporter: Thomas Jungblut > Assignee: Thomas Jungblut > Priority: Blocker > Fix For: 0.3.0 > > > Email: > ---------- Forwarded message ---------- > From: Yunkai Zhang > Date: Fri, Jun 24, 2011 at 9:51 AM > Subject: A bug in the PageRank example > To: hama-user@incubator.apache.org > Hi, > I am playing with the pagerank example from trunk and found there is a bug > in the code. > If I assign any value other than 0.85 to the damping factor, the results > won't sum to 1. > For example: Set damping factor to *0.5* > 11/06/23 17:28:05 INFO graph.PageRankBase: -------------------- RESULTS > -------------------- > 11/06/23 17:28:06 INFO graph.PageRankBase: stackoverflow.com | > 0.052213531500120945 > 11/06/23 17:28:06 INFO graph.PageRankBase: nasa.gov | 0.04235399497763073 > 11/06/23 17:28:06 INFO graph.PageRankBase: facebook.com | > 0.030321424044325564 > 11/06/23 17:28:06 INFO graph.PageRankBase: yahoo.com | 0.05650175656380897 > 11/06/23 17:28:07 INFO graph.PageRankBase: youtube.com | > 0.025716796492259456 > 11/06/23 17:28:07 INFO graph.PageRankBase: google.com | 0.07350857237752877 > 11/06/23 17:28:07 INFO graph.PageRankBase: twitter.com | > 0.030321424044325564 > The sum is 0.3ish. > Therefore, I read the code. I think a possible reason is that the value of * > ALPHA* is hard-coded. (Formula: P(i) = ALPHA + 0.85 * sum, ALPHA = 0.15 / > NumVertices() ) > In PageRank.java, line 167: ALPHA = *0.15* / (double) numOfVertices; > I think 0.15 should be replaced by (1 - DAMPING_FACTOR). > --------------------- > We have to change the alpha to (1 - DAMPING_FACTOR). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira