You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by jkbradley <gi...@git.apache.org> on 2017/03/26 00:08:47 UTC
[GitHub] spark pull request #17407: [SPARK-20043][ML] DecisionTreeModel can't recongn...
Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/17407#discussion_r108048398
--- Diff: mllib/src/test/scala/org/apache/spark/ml/classification/DecisionTreeClassifierSuite.scala ---
@@ -385,6 +385,20 @@ class DecisionTreeClassifierSuite
testEstimatorAndModelReadWrite(dt, continuousData, allParamSettings ++ Map("maxDepth" -> 0),
allParamSettings ++ Map("maxDepth" -> 0), checkModelData)
}
+
+ test("read/write: ImpurityCalculator builder did not recognize impurity type: Gini") {
+ val rdd = TreeTests.getTreeReadWriteData(sc)
+
+ val categoricalData: DataFrame =
+ TreeTests.setMetadata(rdd, Map(0 -> 2, 1 -> 3), numClasses = 2)
+
+ // BUG: see SPARK-20043
+ val dt = new DecisionTreeClassifier().setImpurity("Gini")
--- End diff --
To make this faster, set maxDepth = 2 (something small)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org