We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d012be7 commit ed5a2dfCopy full SHA for ed5a2df
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala
@@ -1093,9 +1093,9 @@ object DecisionTree extends Serializable with Logging {
1093
*/
1094
if (strategy.categoricalFeaturesInfo.size > 0) {
1095
val maxCategoriesForFeatures = strategy.categoricalFeaturesInfo.maxBy(_._2)._2
1096
- require(numBins >= maxCategoriesForFeatures)
+ require(numBins > maxCategoriesForFeatures)
1097
if (strategy.isMultiClassification) {
1098
- require(numBins > math.pow(2, maxCategoriesForFeatures.toInt) - 1)
+ require(numBins > math.pow(2, maxCategoriesForFeatures.toInt - 1) - 1)
1099
}
1100
1101
0 commit comments