# NOT RUN {
# Cluster the 4 numeric variables of the iris dataset.
library(amap)
library(rattle)
model <- hclusterpar(iris[, -5])
# Get the information about the cluster centers. The last
# parameter of the function used is the number of clusters
# desired.
centerInfo <- centers.hclust(iris[, -5], model, 3)
# Convert to pmml
model_pmml <- pmml(model, centers = centerInfo)
# }
Run the code above in your browser using DataLab