Remove inefficient debug code previously missed.

This commit is contained in:
Joel Therrien 2018-07-03 11:20:15 -07:00
parent 5f280d09a1
commit df35a2007a

View file

@ -59,9 +59,6 @@ public class TreeTrainer<Y> {
Double bestSplitScore = 0.0; // may be null Double bestSplitScore = 0.0; // may be null
boolean first = true; boolean first = true;
// temporary
final List<SplitRule> previousRules = new ArrayList<>();
for(final String covariate : covariatesToTry){ for(final String covariate : covariatesToTry){
final List<Row<Y>> shuffledData; final List<Row<Y>> shuffledData;
@ -90,8 +87,6 @@ public class TreeTrainer<Y> {
final SplitRule possibleRule = shuffledData.get(tries).getCovariate(covariate).generateSplitRule(covariate); final SplitRule possibleRule = shuffledData.get(tries).getCovariate(covariate).generateSplitRule(covariate);
final Split<Y> possibleSplit = possibleRule.applyRule(data); final Split<Y> possibleSplit = possibleRule.applyRule(data);
previousRules.add(possibleRule);
final Double score = groupDifferentiator.differentiate( final Double score = groupDifferentiator.differentiate(
possibleSplit.leftHand.stream().map(row -> row.getResponse()).collect(Collectors.toList()), possibleSplit.leftHand.stream().map(row -> row.getResponse()).collect(Collectors.toList()),
possibleSplit.rightHand.stream().map(row -> row.getResponse()).collect(Collectors.toList()) possibleSplit.rightHand.stream().map(row -> row.getResponse()).collect(Collectors.toList())