Class: LDAModel

eclairjs/mllib/clustering.LDAModel

(abstract) new LDAModel()

Latent Dirichlet Allocation (LDA) model. This abstraction permits for different underlying representations, including local and distributed data structures.
Source:

Methods

describeTopics(maxTermsPerTopicopt) → {Array.<Tuple2>}

Return the topics described by weighted terms.
Parameters:
Name Type Attributes Description
maxTermsPerTopic number <optional>
Maximum number of terms to collect for each topic. (term indices, term weights in topic). Each topic's terms are sorted in order of decreasing weight.
Source:
Returns:
Array over topics. Each topic is represented as a pair of matching arrays:
Type
Array.<Tuple2>

docConcentration() → {module:eclairjs/mllib/linalg.Vector}

Concentration parameter (commonly named "alpha") for the prior placed on documents' distributions over topics ("theta"). This is the parameter to a Dirichlet distribution.
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

k() → {Promise.<number>}

Source:
Returns:
Type
Promise.<number>

topicConcentration() → {Promise.<number>}

Concentration parameter (commonly named "beta" or "eta") for the prior placed on topics' distributions over terms. This is the parameter to a symmetric Dirichlet distribution. Note: The topics' distributions over terms are called "beta" in the original LDA paper by Blei et al., but are called "phi" in many later papers such as Asuncion et al., 2009.
Source:
Returns:
Type
Promise.<number>

topicsMatrix() → {module:eclairjs/mllib/linalg.Matrix}

Inferred topics, where each topic is represented by a distribution over terms. This is a matrix of size vocabSize x k, where each column is a topic. No guarantees are given about the ordering of the topics.
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Matrix

vocabSize() → {Promise.<number>}

Source:
Returns:
Type
Promise.<number>