diff --git a/src/main/java/ca/joeltherrien/randomforest/tree/ForestTrainer.java b/src/main/java/ca/joeltherrien/randomforest/tree/ForestTrainer.java index 7896519..26adfc0 100644 --- a/src/main/java/ca/joeltherrien/randomforest/tree/ForestTrainer.java +++ b/src/main/java/ca/joeltherrien/randomforest/tree/ForestTrainer.java @@ -29,9 +29,6 @@ public class ForestTrainer { private final ResponseCombiner treeResponseCombiner; private final List> data; - // number of covariates to randomly try - private final int mtry; - // number of trees to try private final int ntree; @@ -39,7 +36,6 @@ public class ForestTrainer { private final String saveTreeLocation; public ForestTrainer(final Settings settings, final List> data, final List covariates){ - this.mtry = settings.getMtry(); this.ntree = settings.getNtree(); this.data = data; this.displayProgress = true; diff --git a/src/test/java/ca/joeltherrien/randomforest/workshop/TrainForest.java b/src/test/java/ca/joeltherrien/randomforest/workshop/TrainForest.java index b198274..e2b07e8 100644 --- a/src/test/java/ca/joeltherrien/randomforest/workshop/TrainForest.java +++ b/src/test/java/ca/joeltherrien/randomforest/workshop/TrainForest.java @@ -54,6 +54,7 @@ public class TrainForest { final TreeTrainer treeTrainer = TreeTrainer.builder() .numberOfSplits(5) .nodeSize(5) + .mtry(4) .maxNodeDepth(100000000) .groupDifferentiator(new WeightedVarianceGroupDifferentiator()) .responseCombiner(new MeanResponseCombiner()) @@ -63,7 +64,6 @@ public class TrainForest { .treeTrainer(treeTrainer) .data(data) .covariates(covariateList) - .mtry(4) .ntree(100) .treeResponseCombiner(new MeanResponseCombiner()) .displayProgress(true)