public class LocalLDAModel extends LDAModel implements scala.Serializable
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.
| Constructor and Description |
|---|
LocalLDAModel(Matrix topics) |
| Modifier and Type | Method and Description |
|---|---|
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)
|
describeTopicspublic LocalLDAModel(Matrix topics)
public int k()
LDAModelpublic int vocabSize()
LDAModelpublic Matrix topicsMatrix()
LDAModeltopicsMatrix in class LDAModelpublic scala.Tuple2<int[],double[]>[] describeTopics(int maxTermsPerTopic)
LDAModelThis 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 LDAModelmaxTermsPerTopic - Maximum number of terms to collect for each topic.