You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2015/05/15 11:36:59 UTC

[jira] [Updated] (SPARK-7663) [MLLIB] feature.Word2Vec throws empty iterator error when the vocabulary size is zero

     [ https://issues.apache.org/jira/browse/SPARK-7663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen updated SPARK-7663:
-----------------------------
      Priority: Minor  (was: Major)
    Issue Type: Improvement  (was: Bug)

Yeah it should be an error in any event. It's just a question of whether you want a different error. You could `require` a non-empty iterator with an appropriate error message instead.

> [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: Improvement
>          Components: ML, MLlib
>    Affects Versions: 1.4.0
>            Reporter: Xusen Yin
>            Priority: Minor
>             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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org