Repository: spark
Updated Branches:
  refs/heads/branch-1.5 914da3593 -> cb61c7b4e


[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.

(cherry picked from commit f01c4220d2b791f470fa6596ffe11baa51517fbe)
Signed-off-by: Xiangrui Meng <m...@databricks.com>


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

Branch: refs/heads/branch-1.5
Commit: cb61c7b4e3d06efdbb61795603c71b3a989d6df1
Parents: 914da35
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:07 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/cb61c7b4/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