Github user mengxr commented on a diff in the pull request: https://github.com/apache/spark/pull/4059#discussion_r23399766 --- Diff: mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala --- @@ -280,6 +280,48 @@ class PythonMLLibAPI extends Serializable { } /** + * Java stub for Python mllib GaussianMixtureEM.train() + */ + def trainGaussianMixtureEM( + data: JavaRDD[Vector], + k: Int, + convergenceTol: Double, + seed: Long, + maxIterations: Int): JList[Object] = { + val gmmAlg = new GaussianMixtureEM() + .setK(k) + .setConvergenceTol(convergenceTol) + .setSeed(seed) + .setMaxIterations(maxIterations) + try { + val model = gmmAlg.run(data.rdd.persist(StorageLevel.MEMORY_AND_DISK)) + List(model.weight, model.mu, model.sigma). + map(_.asInstanceOf[Object]).asJava + } finally { + data.rdd.unpersist(blocking = false) + } + } + + /** + * Java stub for Python mllib GaussianMixtureModel.predictSoft() + */ + def findPredict( --- End diff -- This is inside `PythonMLlibAPI`. It is necessary to mention GMM in the method name. Btw, I don't quite understand what `find` means here.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org