diff --git a/h2o-algos/src/main/java/hex/tree/isoforextended/ExtendedIsolationForest.java b/h2o-algos/src/main/java/hex/tree/isoforextended/ExtendedIsolationForest.java index 810f5c35ad22..562234808f50 100644 --- a/h2o-algos/src/main/java/hex/tree/isoforextended/ExtendedIsolationForest.java +++ b/h2o-algos/src/main/java/hex/tree/isoforextended/ExtendedIsolationForest.java @@ -210,7 +210,7 @@ private void buildIsolationTreeEnsemble() { final boolean printout = (_parms._score_each_iteration || finalScoring || (sinceLastScore > _parms._score_interval && scored)) && !_parms._disable_training_metrics; if (printout) { _model._output._model_summary = createModelSummaryTable(); - _model._output._scoring_history = createScoringHistoryTable(); + _model._output._scoring_history = createScoringHistoryTable(tid+1); LOG.info(_model.toString()); } } @@ -277,7 +277,7 @@ public TwoDimTable createModelSummaryTable() { return table; } - protected TwoDimTable createScoringHistoryTable() { + protected TwoDimTable createScoringHistoryTable(int ntreesTrained) { List colHeaders = new ArrayList<>(); List colTypes = new ArrayList<>(); List colFormat = new ArrayList<>(); @@ -293,7 +293,7 @@ protected TwoDimTable createScoringHistoryTable() { ScoreKeeper[] sks = _model._output._scored_train; int rows = 0; - for (int i = 0; i < sks.length; i++) { + for (int i = 0; i <= ntreesTrained; i++) { if (i != 0 && sks[i] != null && Double.isNaN(sks[i]._anomaly_score) || sks[i] == null) continue; rows++; } @@ -305,7 +305,7 @@ protected TwoDimTable createScoringHistoryTable() { colFormat.toArray(new String[0]), ""); int row = 0; - for( int i = 0; i