# NOT RUN {
devAskNewPage(ask = TRUE)
data("iris")
# Show level attributes.
levels(iris[["Class"]])
# Split dataset into train (75<!-- %) and test (25%) subsets. -->
set.seed(5)
Iris <- split(p = 0.75, Dataset = iris, class = 5)
# Estimate number of components, component weights and component
# parameters for train subsets.
n <- range(a.ntrain(Iris))
irisest <- REBMIX(model = "REBMVNORM",
Dataset = a.train(Iris),
Preprocessing = "kernel density estimation",
cmax = 10,
Criterion = "ICL-BIC",
pdf = rep("normal", 4))
plot(irisest, pos = 1, nrow = 3, ncol = 2, what = c("pdf"))
plot(irisest, pos = 2, nrow = 3, ncol = 2, what = c("pdf"))
plot(irisest, pos = 3, nrow = 3, ncol = 2, what = c("pdf"))
# Selected chunks.
iriscla <- RCLSMIX(model = "RCLSMVNORM",
x = list(irisest),
Dataset = a.test(Iris),
Zt = a.Zt(Iris))
iriscla
summary(iriscla)
# Plot selected chunks.
plot(iriscla, nrow = 3, ncol = 2)
# }
Run the code above in your browser using DataLab