hama-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandy Ding <sandy.ding...@gmail.com>
Subject How is the globalError computed in pagerank?
Date Thu, 25 Oct 2012 07:23:11 GMT
Hi, all

When I checked the source code, I am confused about how the globa error of
pagerank is calculated.
It seems to me that in bsp() (GraphJobRunner.java), after each vertex is
computed,
first aggregate(vertex, vertex.getValue()) is called,
then aggregate(vertex, lastValue, vertex.getValue()) is also called.

<the last part of bsp() function in GraphJobRunner.java>
if (aggregators != null) {
283             if (this.aggregators != null) {
284               for (int i = 0; i < this.aggregators.length; i++) {
285                 Aggregator<M, Vertex<V, E, M>> aggregator =
this.aggregators[i];
286                 aggregator.aggregate(vertex, vertex.getValue());
287                 if (isAbstractAggregator[i]) {
288                   AbstractAggregator<M, Vertex<V, E, M>> intern =
((AbstractAggregator<M, Vertex<V, E, M>>) aggregator);
289                   intern.aggregate(vertex, lastValue,
vertex.getValue());
290                   intern.aggregateInternal();
291                 }
292               }
293             }
294           }

This means that both the vertex value and the difference will be added to
compute the global error.
But I think intuitively only the difference should be accumulated.
So what's the consideration? Or do I have some misunderstandings?

Best
Sandy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message