Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/5748#discussion_r31455524
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/feature/Word2VecSuite.scala ---
@@ -38,6 +38,13 @@ class Word2VecSuite extends FunSuite with
MLlibTestSparkContext {
assert(syms.length == 2)
assert(syms(0)._1 == "b")
assert(syms(1)._1 == "c")
+
+ val word2VecMap = model.getVectors
+ val newModel = new Word2VecModel(word2VecMap)
+ val newSyms = newModel.findSynonyms("a", 2)
--- End diff --
Instead of testing newModel like this, can you just compare the model data
with the original model?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]