|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.apache.spark.mllib.clustering.LDAModel org.apache.spark.mllib.clustering.LocalLDAModel
public class LocalLDAModel
:: Experimental ::
Local LDA model.
This model stores only the inferred topics.
It may be used for computing topics for new documents, but it may give less accurate answers
than the DistributedLDAModel
.
param: topics Inferred topics (vocabSize x k matrix).
Method Summary | |
---|---|
scala.Tuple2<int[],double[]>[] |
describeTopics(int maxTermsPerTopic)
Return the topics described by weighted terms. |
int |
k()
Number of topics |
Matrix |
topicsMatrix()
Inferred topics, where each topic is represented by a distribution over terms. |
int |
vocabSize()
Vocabulary size (number of terms or terms in the vocabulary) |
Methods inherited from class org.apache.spark.mllib.clustering.LDAModel |
---|
describeTopics |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int k()
LDAModel
k
in class LDAModel
public int vocabSize()
LDAModel
vocabSize
in class LDAModel
public Matrix topicsMatrix()
LDAModel
topicsMatrix
in class LDAModel
public scala.Tuple2<int[],double[]>[] describeTopics(int maxTermsPerTopic)
LDAModel
This limits the number of terms per topic. This is approximate; it may not return exactly the top-weighted terms for each topic. To get a more precise set of top terms, increase maxTermsPerTopic.
describeTopics
in class LDAModel
maxTermsPerTopic
- Maximum number of terms to collect for each topic.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |