Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/7064#discussion_r33830812
--- Diff:
mllib/src/test/java/org/apache/spark/mllib/clustering/JavaLDASuite.java ---
@@ -110,7 +111,16 @@ public void distributedLDAModel() {
// Check: topic distributions
JavaPairRDD<Long, Vector> topicDistributions =
model.javaTopicDistributions();
- assertEquals(topicDistributions.count(), corpus.count());
+ // SPARK-5562. since the topicDistribution returns the distribution of
the non empty docs
+ // over topics. Compare it against nonEmptyCorpus instead of corpus
+ JavaPairRDD<Long, Vector> nonEmptyCorpus = corpus.filter(
+ new Function<Tuple2<Long, Vector>, Boolean>() {
--- End diff --
Please fix indentation:
[https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide]
Actually, I don't think we need to test correctness here since it's tested
in the Java unit test
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]