Skip to content

Commit

Permalink
[SPARK-4582][MLLIB] get raw vectors for further processing in Word2Vec
Browse files Browse the repository at this point in the history
This is #3309 for the master branch.

e.g. clustering

Author: tkaessmann <tobias.kaessmanns24.com>

Closes #3309 from tkaessmann/branch-1.2 and squashes the following commits:

e3a3142 [tkaessmann] changes the comment for getVectors
58d3d83 [tkaessmann] removes sign from comment
a5be213 [tkaessmann] fixes getVectors to fit code guidelines
3782fa9 [tkaessmann] get raw vectors for further processing

Author: tkaessmann <[email protected]>

Closes #3437 from mengxr/SPARK-4582 and squashes the following commits:

6c666b4 [tkaessmann] get raw vectors for further processing in Word2Vec
  • Loading branch information
tkaessmann authored and mengxr committed Nov 25, 2014
1 parent f0afb62 commit 9ce2bf3
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,4 +461,11 @@ class Word2VecModel private[mllib] (
.tail
.toArray
}

/**
* Returns a map of words to their vector representations.
*/
def getVectors: Map[String, Array[Float]] = {
model
}
}

0 comments on commit 9ce2bf3

Please sign in to comment.