aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
authorFeynman Liang <fliang@databricks.com>2015-08-25 17:39:20 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-08-25 17:39:20 -0700
commit125205cdb35530cdb4a8fff3e1ee49cf4a299583 (patch)
treef0ee392b3557dcb8fde6acfe898ceb3b9726d1f5 /mllib
parent7467b52ed07f174d93dfc4cb544dc4b69a2c2826 (diff)
downloadspark-125205cdb35530cdb4a8fff3e1ee49cf4a299583.tar.gz
spark-125205cdb35530cdb4a8fff3e1ee49cf4a299583.tar.bz2
spark-125205cdb35530cdb4a8fff3e1ee49cf4a299583.zip
[SPARK-9888] [MLLIB] User guide for new LDA features
* Adds two new sections to LDA's user guide; one for each optimizer/model * Documents new features added to LDA (e.g. topXXXperXXX, asymmetric priors, hyperpam optimization) * Cleans up a TODO and sets a default parameter in LDA code jkbradley hhbyyh Author: Feynman Liang <fliang@databricks.com> Closes #8254 from feynmanliang/SPARK-9888.
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala1
-rw-r--r--mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala1
2 files changed, 1 insertions, 1 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala b/mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala
index 667374a2bc..432bbedc8d 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala
@@ -435,7 +435,6 @@ object LocalLDAModel extends Loader[LocalLDAModel] {
}
val topicsMat = Matrices.fromBreeze(brzTopics)
- // TODO: initialize with docConcentration, topicConcentration, and gammaShape after SPARK-9940
new LocalLDAModel(topicsMat, docConcentration, topicConcentration, gammaShape)
}
}
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 746a76a7e5..37fb69d68f 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
@@ -68,6 +68,7 @@ class LDASuite extends SparkFunSuite with MLlibTestSparkContext {
// Train a model
val lda = new LDA()
lda.setK(k)
+ .setOptimizer(new EMLDAOptimizer)
.setDocConcentration(topicSmoothing)
.setTopicConcentration(termSmoothing)
.setMaxIterations(5)