Skip to content
Snippets Groups Projects
Commit 9ce2bf38 authored by tkaessmann's avatar tkaessmann Committed by Xiangrui Meng
Browse files

[SPARK-4582][MLLIB] get raw vectors for further processing in Word2Vec

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 <tobias.kaessmann@s24.com>

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

6c666b4 [tkaessmann] get raw vectors for further processing in Word2Vec
parent f0afb623
No related branches found
No related tags found
No related merge requests found
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment