Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/9484#discussion_r44091630
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala ---
@@ -374,9 +374,14 @@ class LDASuite extends SparkFunSuite with
MLlibTestSparkContext {
.values
.collect()
- expectedPredictions.zip(actualPredictions).forall { case (expected,
actual) =>
- expected._1 === actual._1 && (expected._2 ~== actual._2 relTol 1E-3D)
+ expectedPredictions.zip(actualPredictions).foreach { case (expected,
actual) =>
+ assert(expected._1 === actual._1 && (expected._2 ~== actual._2
relTol 1E-3D))
}
+
+ val topicsBz =
ldaModel.topicDistributions(docs.first())._2.toBreeze.toDenseVector
+ val singlePrediction = (argmax(topicsBz), max(topicsBz))
--- End diff --
Can you please change this test to compare the full topicDistribution for
the doc (with the distribution computed using the batch topicDistributions()
call), rather than just the most important topic?
---
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]