noupclassify(Xtrain, cltrain, Xtest, cltest = NULL, modelscope = NULL, ...)Xtrain
Xtest. By default, these are not supplied and the function sets out to obtain them.
NULL, all available models are tested. The models available for univariate and multivariate data are described in modelvec.
modelscope, with the Best model (according to BIC) first.
The details of the output components are as follows
promeanvariancezclmisclassrateBriertabzclmisclassrateBriertabC. 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
upclassify, noupclassifymodel, modelvec
data(iris)
X<- as.matrix(iris[,-5])
cl<-as.matrix(iris[,5])
indtrain <- sort(sample(1:150, 30))
Xtrain <- X[indtrain,]
cltrain <- cl[indtrain]
indtest <- setdiff(1:150, indtrain)
Xtest <- X[indtest,]
cltest <- cl[indtest]
fitnoupmodels <- noupclassify(Xtrain, cltrain,
Xtest, cltest) #testing every model.
fitnoupmodels$Best$modelName
Run the code above in your browser using DataLab