[
https://issues.apache.org/jira/browse/SPARK-7857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14571662#comment-14571662
]
Joseph K. Bradley commented on SPARK-7857:
------------------------------------------
I looked again, and I agree the test is confusing but do think it's meant to
test minDocFreq. Look at the difference in how "expected" is calculated. With
minDocFreq = 1, the term which never appears is filtered out, rather than being
present with the smoothed value. (It's unsmoothed value would be 0, but IDF
adds a single count to smooth all elements, unless they are filtered.)
> IDF w/ minDocFreq on SparseVectors results in literal zeros
> -----------------------------------------------------------
>
> Key: SPARK-7857
> URL: https://issues.apache.org/jira/browse/SPARK-7857
> Project: Spark
> Issue Type: Bug
> Components: MLlib
> Reporter: Karl Higley
> Priority: Minor
>
> When the IDF model's minDocFreq parameter is set to a non-zero threshold, the
> IDF for any feature below that threshold is set to zero. When the model is
> used to transform a set of SparseVectors containing that feature, the
> resulting SparseVectors contain entries whose values are zero. The zero
> entries should be omitted in order to simplify downstream processing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]