Repository: spark
Updated Branches:
  refs/heads/master e3355090d -> f01c4220d


[SPARK-10163] [ML] Allow single-category features for GBT models

Removed categorical feature info validation since no longer needed

This is needed to make the ML user guide examples work (in another current PR).

CC: mengxr

Author: Joseph K. Bradley <jos...@databricks.com>

Closes #8367 from jkbradley/gbt-single-cat.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f01c4220
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f01c4220
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f01c4220

Branch: refs/heads/master
Commit: f01c4220d2b791f470fa6596ffe11baa51517fbe
Parents: e335509
Author: Joseph K. Bradley <jos...@databricks.com>
Authored: Fri Aug 21 16:28:00 2015 -0700
Committer: Xiangrui Meng <m...@databricks.com>
Committed: Fri Aug 21 16:28:00 2015 -0700

----------------------------------------------------------------------
 .../org/apache/spark/mllib/tree/configuration/Strategy.scala    | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/f01c4220/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala
----------------------------------------------------------------------
diff --git 
a/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala 
b/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala
index a58f01b..b74e3f1 100644
--- 
a/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala
+++ 
b/mllib/src/main/scala/org/apache/spark/mllib/tree/configuration/Strategy.scala
@@ -158,11 +158,6 @@ class Strategy (
       s"  Valid values are integers >= 0.")
     require(maxBins >= 2, s"DecisionTree Strategy given invalid maxBins 
parameter: $maxBins." +
       s"  Valid values are integers >= 2.")
-    categoricalFeaturesInfo.foreach { case (feature, arity) =>
-      require(arity >= 2,
-        s"DecisionTree Strategy given invalid categoricalFeaturesInfo 
setting:" +
-        s" feature $feature has $arity categories.  The number of categories 
should be >= 2.")
-    }
     require(minInstancesPerNode >= 1,
       s"DecisionTree Strategy requires minInstancesPerNode >= 1 but was given 
$minInstancesPerNode")
     require(maxMemoryInMB <= 10240,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to