Reputation: 193
Is there anyway to change the window size used in pyspark.mllib.feature.Word2Vec
or is it permanently fixed at 5? This seems like a fairly important feature.
I don't see the option here: https://spark.apache.org/docs/1.4.1/api/scala/index.html#org.apache.spark.mllib.feature.Word2Vec
Upvotes: 3
Views: 957
Reputation: 7452
Thats correct, looking at the Word2Vec code we can see that it is a private val. If you wanted to you could maybe override Word2Vec to change the window size. I've created a JIRA ( https://issues.apache.org/jira/browse/SPARK-10299 ) to allow the window size to be set, since 1.5 is already in the RC phase this probably won't make it in until 1.6 time.
Upvotes: 6