View source: R/functions_EM_helper.R
E_step_multi | R Documentation |
E step of the EM algorithm with multiple clusters it has to take .D_train (labeled documents) too because for negative label documents, we have to estimate cluster probability TO BE UPDATED
E_step_multi(
.C_train,
.D_train,
.D_test,
.X_c = NA,
.X_b = NA,
.class_prob,
.word_prob,
.mu = NA,
.psi = NA,
.sig = NA
)
.D_test |
document term matrix for the test data |
.class_prob |
log of the class probability |
.word_prob |
log of the word probability |
.mu |
log of continuous metadata probability |
.psi |
log of binary metadata probability |
.C_train: |
class matrix of the training data |
.D_train: |
document term matrix of the training data |
a matrix of the log probability of each doc having each class dimension is length(D_test) by 2 Vectorize matrices, stack them, apply logsumexp, then reshape into matrix form.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.