spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dorx <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-2786][mllib] Python correlations
Date Fri, 01 Aug 2014 20:43:22 GMT
Github user dorx commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1713#discussion_r15717902
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala
---
    @@ -456,6 +458,37 @@ class PythonMLLibAPI extends Serializable {
         ALS.trainImplicit(ratings, rank, iterations, lambda, blocks, alpha)
       }
     
    +  /**
    +   * Java stub for mllib Statistics.corr(X: RDD[Vector], method: String).
    +   * Returns the correlation matrix serialized into a byte array understood by deserializers
in
    +   * pyspark.
    +   */
    +  def corr(X: JavaRDD[Array[Byte]], method: String): Array[Byte] = {
    +    val inputMatrix = X.rdd.map(deserializeDoubleVector(_))
    --- End diff --
    
    Actually it is in this case, since `deserializeDoubleVector` has 2 arguments (with `offset`
being optional).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message