3

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

4

1 回答 1

6

没错,查看 Word2Vec 代码我们可以看到它是一个私有 val。如果您愿意,您可以覆盖 Word2Vec 以更改窗口大小。我创建了一个 JIRA ( https://issues.apache.org/jira/browse/SPARK-10299 ) 来允许设置窗口大小,因为 1.5 已经处于 RC 阶段,这可能不会进入直到1.6倍。

于 2015-08-26T18:59:01.643 回答