spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mengxr <...@git.apache.org>
Subject [GitHub] spark pull request: get raw vectors for further processing in Word...
Date Wed, 19 Nov 2014 04:58:23 GMT
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3309#discussion_r20557819
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/Word2Vec.scala ---
    @@ -461,4 +461,13 @@ class Word2VecModel private[mllib] (
           .tail
           .toArray
       }
    +  
    +  /**
    +   * Returns the strings with its raw vectors for further processing
    +   * (e.g. clustering)
    --- End diff --
    
    Sorry for making one more iteration! The doc could be more concise, e.g.
    
    ~~~
    Returns a map of words to their vector representations.
    ~~~
    
    `for further processing (e.g. cluster)` is not necessary because we don't restrict how
users will use it.
    
    Usually, if `Returns ...` contains all the information, we don't need `@return`.
    
    Another question I have is on the return type. We use `Array[Float]` to save space in
computation. Shall we return `Map[String, Vector]` here, just to be consistent with others?
@Ishiihara 


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message