Given an n x p matrix of count data x
, as well as a
p x k matrix of probabilities p
, return the responsibilities
of each sample for the k groups in a n x k matrix. If x
has any non-integer values, they are rounded to the nearest integer.
e_step_mn(x, p, mc, Llks = NULL, labels = NULL)
sparseMatrix. A sample by feature matrix of counts.
numeric matrix. A feature by group matrix of probabilities.
numeric. Mixture coefficients
If log likelihood was computed for the mixture, provide the matrix here.
Numeric vector of same length as number of rows in x. Fixes the group probabilities of the integer in this vector element to 1. In other words, the latent variable for these samples are treated as known.
a numeric matrix with n samples by k groups.