Skip to content

Commit

Permalink
Added check in Strategy to make sure minInstancesPerNode >= 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbradley committed Sep 11, 2014
1 parent 0dd4d87 commit 5c4ac33
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class Strategy (
if (algo == Classification) {
require(numClassesForClassification >= 2)
}
require(minInstancesPerNode >= 1,
s"DecisionTree Strategy requires minInstancesPerNode >= 1 but was given $minInstancesPerNode")

val isMulticlassClassification =
algo == Classification && numClassesForClassification > 2
val isMulticlassWithCategoricalFeatures
Expand Down

0 comments on commit 5c4ac33

Please sign in to comment.