mclustDAtest {mclust} | R Documentation |
Testing phase for MclustDA discriminant analysis.
mclustDAtest(data, models)
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 |
Apply summary
to the output to obtain the classification
of the test data.
A matrix in which the [i,j]
th entry is the
density for that test observation i in the model for class j.
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.
summary.mclustDAtest
,
classError
,
mclustDAtrain
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])