predict.MclustDR | R Documentation |
Classify multivariate observations on a dimension reduced subspace estimated from a Gaussian finite mixture model.
## S3 method for class 'MclustDR'
predict(object, dim = 1:object$numdir, newdata, eval.points, ...)
object |
an object of class |
dim |
the dimensions of the reduced subspace used for prediction. |
newdata |
a data frame or matrix giving the data. If missing the data obtained from the call to |
eval.points |
a data frame or matrix giving the data projected on the reduced subspace. If provided |
... |
further arguments passed to or from other methods. |
Returns a list of with the following components:
dir |
a matrix containing the data projected onto the |
density |
densities from mixture model for each data point. |
z |
a matrix whose [i,k]th entry is the probability that
observation i in |
uncertainty |
The uncertainty associated with the classification. |
classification |
A vector of values giving the MAP classification. |
Luca Scrucca
Scrucca, L. (2010) Dimension reduction for model-based clustering. Statistics and Computing, 20(4), pp. 471-484.
MclustDR
.
mod = Mclust(iris[,1:4])
dr = MclustDR(mod)
pred = predict(dr)
str(pred)
data(banknote)
mod = MclustDA(banknote[,2:7], banknote$Status)
dr = MclustDR(mod)
pred = predict(dr)
str(pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.