diff --git a/src/main/java/ca/joeltherrien/randomforest/tree/Forest.java b/src/main/java/ca/joeltherrien/randomforest/tree/Forest.java index 276c16c..1740f18 100644 --- a/src/main/java/ca/joeltherrien/randomforest/tree/Forest.java +++ b/src/main/java/ca/joeltherrien/randomforest/tree/Forest.java @@ -20,13 +20,16 @@ import ca.joeltherrien.randomforest.CovariateRow; import ca.joeltherrien.randomforest.covariates.Covariate; import lombok.Builder; -import java.util.*; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; import java.util.stream.Collectors; @Builder public class Forest { // O = output of trees, FO = forest output. In practice O == FO, even in competing risk & survival settings - private final Collection> trees; + private final List> trees; private final ResponseCombiner treeResponseCombiner; private final List covariateList; @@ -63,8 +66,8 @@ public class Forest { // O = output of trees, FO = forest output. In prac } - public Collection> getTrees(){ - return Collections.unmodifiableCollection(trees); + public List> getTrees(){ + return Collections.unmodifiableList(trees); } public Map findSplitsByCovariate(){