Learn R Programming

mclust (version 3.5)

summary.mclustDAtest: Classification and posterior probability from mclustDAtest.

Description

Extract classifications and the corresponding posterior probabilities from mclustDAtest.

Usage

## S3 method for class 'mclustDAtest':
summary(object, pro=NULL, \dots)

Arguments

object
The output of mclustDAtest.
pro
Optional prior probabilities for each class in the training data.
...
Not used. For generic/method consistency.

Value

  • A list with the following two components:
  • classficationThe classification from mclustDAtest.
  • zMatrix of posterior probabilities in which the [i,j]th entry is the probability of observation i belonging to 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

classError, mclustDAtest

Examples

Run this code
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
testSummary <- summary(test) 
names(testSummary)
classError(testSummary$classification,cross[even,1])

Run the code above in your browser using DataLab