Permalink
Browse files

solve issue that aggregator wasn't aggregating correctly

  • Loading branch information...
1 parent 949bc50 commit 9a87175652bb5d3647ddab74070652c13c6bbc2f @fbrubacher committed Aug 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 storm-ml/src/main/java/com/twitter/algorithms/Aggregator.java
View
4 storm-ml/src/main/java/com/twitter/algorithms/Aggregator.java
@@ -43,8 +43,8 @@ public void execute(Tuple tuple) {
MathUtil.plus(aggregateWeights, weight);
}
totalUpdateWeight += parallelUpdateWeight;
- LOG.info("totalUpdate");
- LOG.info(totalUpdateWeight);
+ LOG.info("aggregate weights" + aggregateWeights);
+ MathUtil.times(aggregateWeights, 1.0 / totalUpdateWeight);
if (aggregateWeights != null) {
memcache.set("model", 3600 * 24, aggregateWeights);
}

0 comments on commit 9a87175

Please sign in to comment.