Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.MclustDR

Classify multivariate observations on a dimension reduced subspace by Gaussian finite mixture modeling


Description

Classify multivariate observations on a dimension reduced subspace estimated from a Gaussian finite mixture model.

Usage

## S3 method for class 'MclustDR'
predict(object, dim = 1:object$numdir, newdata, eval.points, ...)

Arguments

object

an object of class 'MclustDR' resulting from a call to MclustDR.

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 MclustDR are used.

eval.points

a data frame or matrix giving the data projected on the reduced subspace. If provided newdata is not used.

...

further arguments passed to or from other methods.

Value

Returns a list of with the following components:

dir

a matrix containing the data projected onto the dim dimensions of the reduced subspace.

density

densities from mixture model for each data point.

z

a matrix whose [i,k]th entry is the probability that observation i in newdata belongs to the kth class.

uncertainty

The uncertainty associated with the classification.

classification

A vector of values giving the MAP classification.

Author(s)

Luca Scrucca

References

Scrucca, L. (2010) Dimension reduction for model-based clustering. Statistics and Computing, 20(4), pp. 471-484.

See Also

Examples

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)

mclust

Gaussian Mixture Modelling for Model-Based Clustering, Classification, and Density Estimation

v5.4.10
GPL (>= 2)
Authors
Chris Fraley [aut], Adrian E. Raftery [aut] (<https://orcid.org/0000-0002-6589-301X>), Luca Scrucca [aut, cre] (<https://orcid.org/0000-0003-3826-0484>), Thomas Brendan Murphy [ctb] (<https://orcid.org/0000-0002-5668-7046>), Michael Fop [ctb] (<https://orcid.org/0000-0003-3936-2757>)
Initial release
2022-05-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.