Evaluates model log-likelihood on a held-out batch of the input data.
Evaluates model log-likelihood on a held-out batch of the input data.
The word x document input data. Has dimension (# words x opts.batchSize), where batchSize is typically much smaller than the total number of documents, so sdata is usually a portion of the full input.
An (opts.dim x opts.batchSize) matrix that stores some intermediate/temporary data and gets left- multiplied by modelmats(0) to form sdata.
Index of the pass over the data (0 = first pass, 1 = second pass, etc.).
Sets up the modelmats and updatemats arrays and initializes modelmats(0) randomly unless stated otherwise.
Sets up the modelmats and updatemats arrays and initializes modelmats(0) randomly unless stated otherwise.
Updates modelmats(0), the topic x word matrix that is ultimately returned as output for the model.
Updates modelmats(0), the topic x word matrix that is ultimately returned as output for the model.
The word x document input data. Has dimension (# words x opts.batchSize), where batchSize is typically much smaller than the total number of documents, so sdata is usually a portion of the full input.
An (opts.dim x opts.batchSize) matrix that stores some intermediate/temporary data and gets left- multiplied by modelmats(0) to form sdata.
Index of the pass over the data (0 = first pass, 1 = second pass, etc.).
Updates user according to the variational EM update process in the original (2003) LDA Paper.
Updates user according to the variational EM update process in the original (2003) LDA Paper.
This can be a bit tricky to understand. See Equation 2.2 in Huasha Zhao's PhD from UC Berkeley for details on the math and cross-reference it with the 2003 LDA journal paper.
The word x document input data. Has dimension (# words x opts.batchSize), where batchSize is typically much smaller than the total number of documents, so sdata is usually a portion of the full input.
An (opts.dim x opts.batchSize) matrix that stores some intermediate/temporary data and gets left- multiplied by modelmats(0) to form sdata.
Index of the pass over the data (0 = first pass, 1 = second pass, etc.).
LDA model using online Variational Bayes (Hoffman, Blei and Bach, 2010)
Parameters
Other key parameters inherited from the learner, datasource and updater:
Example:
a is a sparse word x document matrix