noupclassifymodel implements the EM algorithm to classify unlabeled data using parameter estimates derived from labeled data only. It is a background function not designed to be used directly.
noupclassifymodel(Xtrain, cltrain, Xtest, cltest = NULL, modelName = "EEE", ...)Xtrain.Xtest. By default, these are not supplied and the function sets out to determine these."EEE". The models available for univariate and multivariate data are described in modelvec.noupclassifymodel or upclassifymodel[i,k]th entry is the conditional probability of the ith observation belonging to the kth component of the mixture.Xtrain/Xtest.z)s obtainedFraley, C. and Raftery, A.E. (2002). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611-631.
Fraley, C. and Raftery, A.E. (2006). MCLUST Version for R: Normal Mixture Modeling and Model-Based Clustering, Technical Report no. 504, Department of Statistics, University of Washington.
modelvec, noupclassify
# This function is not designed to be used on its own,
# but to be called by \code{noupclassify}
data(wine, package = "gclus")
X <- as.matrix(wine[, -1])
cl <- unclass(wine[, 1])
indtrain <- sort(sample(1:178, 120))
indtest <- setdiff(1:178, indtrain)
fitnoup <- noupclassifymodel(X[indtrain,],
cl[indtrain], X[indtest,], cl[indtest])
Run the code above in your browser using DataLab