Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2C4FA200C06 for ; Fri, 13 Jan 2017 03:32:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2AFF9160B4C; Fri, 13 Jan 2017 02:32:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7431E160B40 for ; Fri, 13 Jan 2017 03:32:02 +0100 (CET) Received: (qmail 53496 invoked by uid 500); 13 Jan 2017 02:32:01 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@spark.apache.org Received: (qmail 53487 invoked by uid 99); 13 Jan 2017 02:32:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2017 02:32:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8BE48DFAF2; Fri, 13 Jan 2017 02:32:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jkbradley@apache.org To: commits@spark.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: spark git commit: [SPARK-19110][MLLIB][FOLLOWUP] Add a unit test for testing logPrior and logLikelihood of DistributedLDAModel in MLLIB Date: Fri, 13 Jan 2017 02:32:01 +0000 (UTC) archived-at: Fri, 13 Jan 2017 02:32:03 -0000 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: wm624@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: wm624@hotmail.com Authored: Thu Jan 12 18:31:57 2017 -0800 Committer: Joseph K. Bradley 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-unsubscribe@spark.apache.org For additional commands, e-mail: commits-help@spark.apache.org