[SPARK-24217][ML]Power Iteration Clustering is not displaying cluster indices corresponding to some vertices #21277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
As per the definition of PIC clustering, given in the code,
PIC takes an affinity matrix between items (or vertices) as input. An affinity matrix
is a symmetric matrix whose entries are non-negative similarities between items.
PIC takes this matrix (or graph) as an adjacency matrix. Specifically, each input row includes:
idCol
: vertex IDneighborsCol
: neighbors of vertex inidCol
similaritiesCol
: non-negative weights (similarities) of edges between the vertexin
idCol
and each neighbor inneighborsCol
predictionCol
containing the cluster assignment in
[0,k)
for each row (vertex).For the same input in spark.ml and spark.mllib, spark.mllib giving cluster id for all the vertices.
How was this patch tested?
UT
Please review http://spark.apache.org/contributing.html before opening a pull request.