Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14370][MLLIB]removed duplicate generation of ids in OnlineLDAOptimizer - #12176
[SPARK-14370][MLLIB]removed duplicate generation of ids in OnlineLDAOptimizer#12176pravingadakh wants to merge 5 commits into
Conversation
| case v: SparseVector => (v.indices.toList, v.values) | ||
| k: Int, | ||
| ids: List[Int]): (BDV[Double], BDM[Double]) = { | ||
| val cts: Array[Double] = termCounts match { |
There was a problem hiding this comment.
The match here becomes redundant right? both cases return v.values
There was a problem hiding this comment.
Yes it looks redundant, but values is not a member of parent trait Vector, it is defined at individual implementation level (i.e. DenseVector and SparseVector).
srowen
commented
Apr 5, 2016
A-ha, understood about |
pravingadakh
commented
Apr 5, 2016
I could document the returned values, but frankly I have no idea what those values are. I can see the documentation of first returned value |
srowen
commented
Apr 5, 2016
Ha fair enough. From poking around the internet I'm pretty sure the first is an estimate of gamma, the topic distribution (as the comments say) and the second are sufficient statistics for updating lambda. |
pravingadakh
commented
Apr 6, 2016
@jkbradley Could you please flag this PR for test build? |
srowen
commented
Apr 6, 2016
Jenkins test this please |
SparkQA
commented
Apr 6, 2016
Test build #55113 has finished for PR 12176 at commit
|
hhbyyh
commented
Apr 7, 2016
Sean is right about the meanings of the return values. |
srowen
commented
Apr 10, 2016
@pravingadakh I'll merge if you'll doc the return value of this method. That further justifies the change. |
pravingadakh
commented
Apr 10, 2016
@srowen Added |
| * avoids explicit computation of variational parameter `phi`. | ||
| * @see [[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.31.7566]] | ||
| * | ||
| * @return A tuple of topic distribution `gammad`, `sstatsd` and `ids`. Latter two are the |
There was a problem hiding this comment.
This doesn't really describe what they are, but simply one place they're called. It doesn't need to be elaborate; see the explanations of what the firs two are above.
There was a problem hiding this comment.
@srowen How about this return doc:
Returns a tuple of
gammad- estimate of gamma, the topic distribution,sstatsd- statistics for updating lambda andids- list of termCounts vector indices
There was a problem hiding this comment.
@srowen Updated the return doc accordingly.
srowen
commented
Apr 13, 2016
@pravingadakh if you'll augment that doc a little bit more I'll merge this. |
jkbradley
commented
Apr 13, 2016
LGTM too pending the doc update (thanks for that) |
srowen
commented
Apr 15, 2016
Jenkins retest this please |
SparkQA
commented
Apr 15, 2016
Test build #55921 has finished for PR 12176 at commit
|
srowen
commented
Apr 15, 2016
Merged to master |
What changes were proposed in this pull request?
Removed duplicated generation of
idsin OnlineLDAOptimizer.How was this patch tested?
tested with existing unit tests.