Github user javadba commented on the pull request:
https://github.com/apache/spark/pull/4254#issuecomment-71932032
Hi,
We have suggestion here: to separate the creation/definition of the input
graph from the PIC:
val G = PIC.createGaussianAffinityMatrix(sc, vertices) // Create the
affinity matrix in a Graph structure
val (ccenters, estCollected) = PIC.run(sc, G, nClusters, nIterations)
// Run PIC
The new signatures are:
Take a Graph input instead of the input vertices:
def run(sc: SparkContext,
G: Graph[Double, Double],
nClusters: Int,
nIterations: Int = defaultIterations,
sigma: Double = defaultSigma,
minAffinity: Double = defaultMinAffinity,
nRuns: Int = defaultKMeansRuns)
And here is the new method for creating the input Graph:
def createGaussianAffinityMatrix(sc: SparkContext,
points: Points,
sigma: Double = defaultSigma,
minAffinity: Double = defaultMinAffinity)
---
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]