Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/20319#discussion_r183565968
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/clustering/BisectingKMeansSuite.scala
---
@@ -65,10 +66,12 @@ class BisectingKMeansSuite
// Verify fit does not fail on very sparse data
val model = bkm.fit(sparseDataset)
- val result = model.transform(sparseDataset)
- val numClusters =
result.select("prediction").distinct().collect().length
- // Verify we hit the edge case
- assert(numClusters < k && numClusters > 1)
+
+ testTransformerByGlobalCheckFunc[Vector](sparseDataset.toDF(), model,
"prediction") { rows =>
--- End diff --
Use ```Tuple1[Vector]``` instead of ```Vector```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]