Class: DistributedLDAModel

eclairjs/ml/clustering. DistributedLDAModel

Distributed model fitted by module:eclairjs/mllib/clustering.LDA. This type of model is currently only produced by Expectation-Maximization (EM). This model stores the inferred topics, the full training dataset, and the topic distribution for each training document.

Constructor

new DistributedLDAModel()

Source:

Extends

Methods

(static) load(path) → {module:eclairjs/mllib/clustering.DistributedLDAModel}

Parameters:
Name Type Description
path string
Source:
Returns:
Type
module:eclairjs/mllib/clustering.DistributedLDAModel

(static) read() → {module:eclairjs/ml/util.MLReader}

Source:
Returns:
Type
module:eclairjs/ml/util.MLReader

copy(extra) → {module:eclairjs/mllib/clustering.DistributedLDAModel}

Parameters:
Name Type Description
extra module:eclairjs/ml/param.ParamMap
Source:
Returns:
Type
module:eclairjs/mllib/clustering.DistributedLDAModel

describeTopics(maxTermsPerTopicopt) → {Array.<module:eclairjs.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.
Inherited From:
Source:
Returns:
Array over topics. Each topic is represented as a pair of matching arrays:
Type
Array.<module:eclairjs.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.
Inherited From:
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

isDistributed() → {boolean}

Source:
Returns:
Type
boolean

k() → {number}

Inherited From:
Source:
Returns:
Type
number

toLocal() → {module:eclairjs/mllib/clustering.LocalLDAModel}

Convert this distributed model to a local representation. This discards info about the training dataset. WARNING: This involves collecting a large topicsMatrix to the driver.
Source:
Returns:
Type
module:eclairjs/mllib/clustering.LocalLDAModel

topicConcentration() → {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.
Inherited From:
Source:
Returns:
Type
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.
Inherited From:
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Matrix

vocabSize() → {number}

Inherited From:
Source:
Returns:
Type
number

write() → {module:eclairjs/ml/util.MLWriter}

Source:
Returns:
Type
module:eclairjs/ml/util.MLWriter