predict.mModel: Predictions for fitted Gaussian component model
Description
For every row in the matrix X the posterior probability of belonging to class i is calculated.
Usage
# S3 method for mModel
predict(object, X, knowns = NULL, B = NULL, P = NULL, ...)
Arguments
object
an object of the class mModel,
X
a matrix or data.frame in which number of columns is equal to object$d.
knowns
a data.frame or matrix with the labeled observations. If the argument knowns is specified then eighter B or P need to be specified.
P
a matrix with plausibilities for object knowns.
B
a matrix with beliefs for object knowns.
…
all other arguments will be neglected.
Value
An list with the following elements:
tij.X, tij.knowns
the matrix tij.X is a matrix with number of rows equal to number of rows in the matrix X and the number of columns equal to the number of components in model defined by argument object. Values in this matrix are posterior probabilities that observation i belongs to component j. The slot tij.knowns is equal to NULL if neither B nor P are specified, otherwise it is a matrix with number of rows equal to number of rows in the matrix knowns and contains posterior probabilities for observarions with specified belief or plausibilities matrix
class.X, class.knowns
vactors of labels/classes obtained with the MAP rule. The vector class.X corresponds to observations in X while the vector class.knowns corresponds to observations in knowns.
Details
The matrix tij of posterior probabilities is calculated as normalized products of priors pi's and density of model components in values specified by rows of the matrix X.
If arguments knowns and B are specified then the priors's for objects in knowns are replaced by belief matrix B.
If arguments knowns and P are specified then the priors's for objects in knowns are multiplied by plausibility matrix P.