From df35a2007a7d2d8c13d8aa114f339072d9b8d05e Mon Sep 17 00:00:00 2001 From: Joel Therrien Date: Tue, 3 Jul 2018 11:20:15 -0700 Subject: [PATCH] Remove inefficient debug code previously missed. --- .../java/ca/joeltherrien/randomforest/tree/TreeTrainer.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/ca/joeltherrien/randomforest/tree/TreeTrainer.java b/src/main/java/ca/joeltherrien/randomforest/tree/TreeTrainer.java index c140164..907f8ef 100644 --- a/src/main/java/ca/joeltherrien/randomforest/tree/TreeTrainer.java +++ b/src/main/java/ca/joeltherrien/randomforest/tree/TreeTrainer.java @@ -59,9 +59,6 @@ public class TreeTrainer { Double bestSplitScore = 0.0; // may be null boolean first = true; - // temporary - final List previousRules = new ArrayList<>(); - for(final String covariate : covariatesToTry){ final List> shuffledData; @@ -90,8 +87,6 @@ public class TreeTrainer { final SplitRule possibleRule = shuffledData.get(tries).getCovariate(covariate).generateSplitRule(covariate); final Split possibleSplit = possibleRule.applyRule(data); - previousRules.add(possibleRule); - final Double score = groupDifferentiator.differentiate( possibleSplit.leftHand.stream().map(row -> row.getResponse()).collect(Collectors.toList()), possibleSplit.rightHand.stream().map(row -> row.getResponse()).collect(Collectors.toList())