Description Usage Arguments Value Author(s) See Also Examples
Classify multivariate observations based on Gaussian finite mixture models estimated by MclustDA
.
1 2 |
object |
an object of class |
newdata |
a data frame or matrix giving the data. If missing the train data obtained from the call to |
prop |
the class proportions or prior class probabilities to belong to each class; by default, this is set at the class proportions in the training data. |
... |
further arguments passed to or from other methods. |
Returns a list of with the following components:
classification |
a factor of predicted class labels for |
z |
a matrix whose [i,k]th entry is the probability that
observation i in |
Luca Scrucca
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
odd <- seq(from = 1, to = nrow(iris), by = 2)
even <- odd + 1
X.train <- iris[odd,-5]
Class.train <- iris[odd,5]
X.test <- iris[even,-5]
Class.test <- iris[even,5]
irisMclustDA <- MclustDA(X.train, Class.train)
predTrain <- predict(irisMclustDA)
predTrain
predTest <- predict(irisMclustDA, X.test)
predTest
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.