Xusen Yin created SPARK-7663: -------------------------------- Summary: [MLLIB] feature.Word2Vec throws empty iterator error when the vocabulary size is zero Key: SPARK-7663 URL: https://issues.apache.org/jira/browse/SPARK-7663 Project: Spark Issue Type: Bug Components: ML, MLlib Affects Versions: 1.4.0 Reporter: Xusen Yin Fix For: 1.4.1
mllib.feature.Word2Vec at line 442: https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/feature/Word2Vec.scala#L442 uses `.head` to get the vector size. But it would throw an empty iterator error if the `minCount` is large enough to remove all words in the dataset. But due to this is not a common scenario, so maybe we can ignore it. If so, we can close the issue directly. If not, I can add some code to print more elegant error hits. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org