cv1EMtrain {mclust} | R Documentation |
Leave-one-out cross validation given a dataset and labels for selected models.
cv1EMtrain(data, labels, modelNames=NULL)
data |
A numeric vector or matrix of observations. |
labels |
Labels for each element or row in the dataset. |
modelNames |
Vector of model names that should be tested. The default is to select all available model names. |
Returns a vector where each element is the the crossvalidated error rate for the dataset and labels corresponding to each model.
C. Fraley and A. E. Raftery (2006, revised 2010). MCLUST Version 3 for R: Normal Mixture Modeling and Model-Based Clustering, Technical Report no. 504, Department of Statistics, University of Washington.
C. Fraley
even <- seq(from=2, to=nrow(chickwts), by=2) round(cv1EMtrain(chickwts[even,1], labels=chickwts[even,2]), 1)