Skip to content

Commit

Permalink
PUBDEV-1778: Fix major bug in DRF scoring - wrong metrics during mode…
Browse files Browse the repository at this point in the history
…l building (were correct at the end).
  • Loading branch information
arnocandel committed Jul 28, 2015
1 parent 02f79e8 commit dad2c4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion h2o-algos/src/main/java/hex/tree/drf/DRFModel.java
Expand Up @@ -34,7 +34,7 @@ public static class DRFOutput extends SharedTreeModel.SharedTreeOutput {
* subclass scoring logic. */
@Override protected double[] score0(double data[], double preds[], double weight, double offset) {
super.score0(data, preds, weight, offset);
int N = _parms._ntrees;
int N = _output._ntrees;
if (_output.nclasses() == 1) { // regression - compute avg over all trees
preds[0] /= N;
} else { // classification
Expand Down

0 comments on commit dad2c4b

Please sign in to comment.