cluster_plot: Clustering Plot

Description Usage Arguments Details Value See Also Examples

Description

A graph in 2D used to visualize the results of the EM clustering algorithm.

Usage

1
cluster_plot(x, means, covariance, clusters)

Arguments

x

This is the data matrix.

means

This is a matrix with rows representing the means of the mixture model.

covariance

This is a list where each element represents the covariance of the components of the distribution.

clusters

This is a cluster label factor indicating each obaservation belonging to.

Details

This function shows the clustering results of the EM algorithm. Ellipses in the plot represent the estimated 95 probability density contours of each of the component. When the dimension is higher than 2, a pairs plot is produced. Presently, the function only works for dimensions being between 2 and 5.

Value

The value returned is the model-based clustering plot(s).

See Also

cluster_em

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
 x1 <- matrix(rnorm(2*200), ncol=2)
 x2 <- matrix(rnorm(2*200,2,1),ncol=2)
 x <- rbind(x1,x2)
 k <- 2
 cl <- cluster_em(x,k,"rcm")
 mean <- cl$mean
 covariance <- cl$sigma
 cluster_plot(x,mean,covariance)

## End(Not run)

RobustEM documentation built on April 14, 2017, 10:05 a.m.