data(iris)
model <- list(
Sepal.Length = "Gaussian", Sepal.Width = "Gaussian",
Petal.Length = "Gaussian", Petal.Width = "Gaussian"
)
resLearn <- mixtCompLearn(iris[-c(1, 51, 101), ], model = model, nClass = 1:3, nRun = 1)
# return the partition
predict(resLearn)
# return the tik for the 3 new irises for 2 and 3 classes
predict(resLearn, newdata = iris[c(1, 51, 101), ], type = "probabilities", nClass = 2)
predict(resLearn, newdata = iris[c(1, 51, 101), ], type = "probabilities", nClass = 3)
Run the code above in your browser using DataLab