summary.mclustDAtest {mclust} | R Documentation |
Extract classifications and the corresponding posterior probabilities
from mclustDAtest
.
## S3 method for class 'mclustDAtest' summary(object, pro=NULL, ...)
object |
The output of |
pro |
Optional prior probabilities for each class in the training data. |
... |
Not used. For generic/method consistency. |
A list with the following two components:
classfication |
The classification from |
z |
Matrix of posterior probabilities in which the |
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.
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])