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_r243598241
##########
File path:
mllib/src/test/scala/org/apache/spark/ml/classification/GBTClassifierSuite.scala
##########
@@ -236,7 +236,8 @@ class GBTClassifierSuite extends MLTest with
DefaultReadWriteTest {
sc.setCheckpointDir(path)
val categoricalFeatures = Map.empty[Int, Int]
- val df: DataFrame = TreeTests.setMetadata(data, categoricalFeatures,
numClasses = 2)
+ val df: DataFrame =
+ TreeTests.setMetadata(data.map(_.toInstance), categoricalFeatures,
numClasses = 2)
Review comment:
This method should probably just accept LabeledPoints and map them
internally, if almost all calls need the caller to map it
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]