Skip to content

Commit

Permalink
PUBDEV-1579: Fix weighted mean, wasn't reducing the sum of weights. W…
Browse files Browse the repository at this point in the history
…ould only work for small data (1 chunk).
  • Loading branch information
arnocandel committed Jun 30, 2015
1 parent 10dcdb9 commit e4e260f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion h2o-core/src/main/java/water/util/FrameUtils.java
Expand Up @@ -241,6 +241,9 @@ public double weightedMean() {
_wsum += w;
}
}
@Override public void reduce(WeightedMean mrt) { _wresponse += mrt._wresponse; }
@Override public void reduce(WeightedMean mrt) {
_wresponse += mrt._wresponse;
_wsum += mrt._wsum;
}
}
}

0 comments on commit e4e260f

Please sign in to comment.