| predict.mModel {bgmm} | R Documentation |
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 class 'mModel'
predict(object, X, knowns = NULL, B = NULL, P = NULL, ...)
Arguments
object |
an object of the class |
X |
a |
knowns |
a |
P |
a matrix with plausibilities for object |
B |
a matrix with beliefs for object |
... |
all other arguments will be neglected. |
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.
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 |
class.X, class.knowns |
vactors of labels/classes obtained with the MAP rule. The vector |
Author(s)
Przemyslaw Biecek, Ewa Szczurek, Martin Vingron, Jerzy Tiuryn (2012), The R Package bgmm: Mixture Modeling with Uncertain Knowledge, Journal of Statistical Software.
References
http://bgmm.molgen.mpg.de
See Also
Examples
data(genotypes)
modelSoft = soft(X=genotypes$X, knowns=genotypes$knowns, P=genotypes$B)
preds = predict(modelSoft, X = genotypes$X)
str(preds)