Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/5173#discussion_r27076053
--- Diff: python/pyspark/mllib/clustering.py ---
@@ -168,8 +168,8 @@ def predictSoft(self, x):
if isinstance(x, RDD):
means, sigmas = zip(*[(g.mu, g.sigma) for g in self.gaussians])
membership_matrix = callMLlibFunc("predictSoftGMM",
x.map(_convert_to_vector),
- self.weights, means, sigmas)
- return membership_matrix
+
_convert_to_vector(self.weights), means, sigmas)
+ return membership_matrix.map(lambda x: x.toArray())
--- End diff --
@mengxr Should we use Vector or numpy.ndarray ?
---
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]