# discriminant coordinates for the iris data using known classes
data("iris")
CRIMCOORDS = crimcoords(iris[,-5], iris$Species)
CRIMCOORDS
# banknote data
data("banknote")
# discriminant coordinate on known classes
CRIMCOORDS = crimcoords(banknote[,-1], banknote$Status)
CRIMCOORDS
# discriminant coordinates on estimated clusters
mod = Mclust(banknote[,-1])
CRIMCOORDS = crimcoords(banknote[,-1], mod$classification, plot = FALSE)
plot(CRIMCOORDS$projection, type = "n")
text(CRIMCOORDS$projection, cex = 0.8,
labels = strtrim(banknote$Status, 2),
col = mclust.options("classPlotColors")[1:mod$G][mod$classification])
Run the code above in your browser using DataLab