srowen commented on a change in pull request #21632: [SPARK-19591][ML][MLlib] 
Add sample weights to decision trees
URL: https://github.com/apache/spark/pull/21632#discussion_r247562160
 
 

 ##########
 File path: 
mllib/src/test/scala/org/apache/spark/mllib/tree/DecisionTreeSuite.scala
 ##########
 @@ -167,7 +167,7 @@ class DecisionTreeSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     val rdd = sc.parallelize(arr)
     val strategy = new Strategy(Classification, Entropy, maxDepth = 3,
       numClasses = 2, maxBins = 100)
-    val metadata = DecisionTreeMetadata.buildMetadata(rdd.map(_.asML), 
strategy)
+    val metadata = 
DecisionTreeMetadata.buildMetadata(rdd.map(_.asML.toInstance), strategy)
 
 Review comment:
   Rather than call `.toInstance` everywhere this is called, why not overload 
`buildMetadata` to accept an RDD of either one?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to