Github user MechCoder commented on a diff in the pull request:
https://github.com/apache/spark/pull/4459#discussion_r24308815
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/clustering/GaussianMixtureSuite.scala
---
@@ -40,10 +41,15 @@ class GaussianMixtureSuite extends FunSuite with
MLlibTestSparkContext {
val seeds = Array(314589, 29032897, 50181, 494821, 4660)
seeds.foreach { seed =>
val gmm = new GaussianMixture().setK(1).setSeed(seed).run(data)
+ val sparseGMM = new
GaussianMixture().setK(1).setSeed(seed).run(sparseData)
assert(gmm.weights(0) ~== Ew absTol 1E-5)
assert(gmm.gaussians(0).mu ~== Emu absTol 1E-5)
assert(gmm.gaussians(0).sigma ~== Esigma absTol 1E-5)
+ assert(sparseGMM.weights(0) ~== Ew absTol 1E-5)
+ assert(sparseGMM.gaussians(0).mu ~== Emu absTol 1E-5)
+ assert(sparseGMM.gaussians(0).sigma ~== Esigma absTol 1E-5)
--- End diff --
How do I come up with the data?
---
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]