Stephen Boesch created SPARK-5963:
-------------------------------------

             Summary: [MLLIB] Python support for Power Iteration Clustering
                 Key: SPARK-5963
                 URL: https://issues.apache.org/jira/browse/SPARK-5963
             Project: Spark
          Issue Type: Bug
          Components: MLlib
            Reporter: Stephen Boesch


Add python support for the Power Iteration Clustering feature.  Here is a 
fragment of the python API as we plan to implement it:

  /**
   * Java stub for Python mllib PowerIterationClustering.run()
   */
  def trainPowerIterationClusteringModel(
      data: JavaRDD[(java.lang.Long, java.lang.Long, java.lang.Double)],
      k: Int,
      maxIterations: Int,
      runs: Int,
      initializationMode: String,
      seed: java.lang.Long): PowerIterationClusteringModel = {
    val picAlg = new PowerIterationClustering()
      .setK(k)
      .setMaxIterations(maxIterations)

    try {
      picAlg.run(data.rdd.persist(StorageLevel.MEMORY_AND_DISK))
    } finally {
      data.rdd.unpersist(blocking = false)
    }
  }




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to