Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/7155#discussion_r33705380
--- Diff: docs/mllib-clustering.md ---
@@ -383,6 +400,30 @@ PowerIterationClusteringModel sameModel =
PowerIterationClusteringModel.load(sc.
{% endhighlight %}
</div>
+<div data-lang="python" markdown="1">
+
+PowerIterationClustering implements the PIC algorithm. It takes an `RDD`
of `(srcId: Long, dstId: Long, similarity: Double)` tuples representing the
affinity matrix.
+Calling `PowerIterationClustering.run` returns a
PowerIterationClusteringModel which contains the computed clustering
assignments.
+
+{% highlight python %}
+from __future__ import print_function
+from pyspark.mllib.clustering import PowerIterationClustering
--- End diff --
Also import `PowerIterationClusteringModel`.
---
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]