Repository: spark Updated Branches: refs/heads/master 5585ed93b -> c983267b0
[SPARK-19110][MLLIB][FOLLOWUP] Add a unit test for testing logPrior and logLikelihood of DistributedLDAModel in MLLIB ## What changes were proposed in this pull request? #16491 added the fix to mllib and a unit test to ml. This followup PR, add unit tests to mllib suite. ## How was this patch tested? Unit tests. Author: wm...@hotmail.com <wm...@hotmail.com> Closes #16524 from wangmiao1981/ldabug. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c983267b Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c983267b Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c983267b Branch: refs/heads/master Commit: c983267b0853f908d1c671cedd18b159e6993df1 Parents: 5585ed9 Author: wm...@hotmail.com <wm...@hotmail.com> Authored: Thu Jan 12 18:31:57 2017 -0800 Committer: Joseph K. Bradley <jos...@databricks.com> Committed: Thu Jan 12 18:31:57 2017 -0800 ---------------------------------------------------------------------- .../test/scala/org/apache/spark/mllib/clustering/LDASuite.scala | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/c983267b/mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala ---------------------------------------------------------------------- diff --git a/mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala index 211e2bc..086bb21 100644 --- a/mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala +++ b/mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala @@ -505,6 +505,8 @@ class LDASuite extends SparkFunSuite with MLlibTestSparkContext { assert(distributedModel.topicConcentration === sameDistributedModel.topicConcentration) assert(distributedModel.gammaShape === sameDistributedModel.gammaShape) assert(distributedModel.globalTopicTotals === sameDistributedModel.globalTopicTotals) + assert(distributedModel.logLikelihood ~== sameDistributedModel.logLikelihood absTol 1e-6) + assert(distributedModel.logPrior ~== sameDistributedModel.logPrior absTol 1e-6) val graph = distributedModel.graph val sameGraph = sameDistributedModel.graph --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org