mclustDAtest {mclust}R Documentation

MclustDA Testing

Description

Testing phase for MclustDA discriminant analysis.

Usage

mclustDAtest(data, models)

Arguments

data

A numeric vector, matrix, or data frame of observations to be classified.

models

A list of MCLUST-style models including parameters, usually the result of applying mclustDAtrain to some training data.

Details

Apply summary to the output to obtain the classification of the test data.

Value

A matrix in which the [i,j]th entry is the density for that test observation i in the model for class j.

References

C. Fraley and A. E. Raftery (2002). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611-631.

C. Fraley and A. E. Raftery (2006). MCLUST Version 3 for R: Normal Mixture Modeling and Model-Based Clustering, Technical Report no. 504, Department of Statistics, University of Washington.

See Also

summary.mclustDAtest, classError, mclustDAtrain

Examples

odd <- seq(1, nrow(cross), by = 2)
train <- mclustDAtrain(cross[odd,-1], labels = cross[odd,1]) ## training step
summary(train)

even <- odd + 1
test <- mclustDAtest(cross[even,-1], train) ## compute model densities
clEven <- summary(test)$class ## classify training set
classError(clEven,cross[even,1])

[Package mclust version 3.4.11 Index]