Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/11933#discussion_r57956424
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/clustering/BisectingKMeansSuite.scala
---
@@ -179,4 +180,21 @@ class BisectingKMeansSuite extends SparkFunSuite with
MLlibTestSparkContext {
}
}
}
+
+ test("BisectingKMeans model save/load") {
+ val tempDir = Utils.createTempDir()
+ val path = tempDir.toURI.toString
+
+ val points = (1 until 8).map(i => Vectors.dense(i))
+ val data = sc.parallelize(points, 2)
+ val model = new BisectingKMeans().run(data)
+ try {
+ model.save(sc, path)
+ val sameModel = BisectingKMeansModel.load(sc, path)
+ assert(model.k == sameModel.k)
--- End diff --
triple equals
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]