Learn R Programming

fdm2id (version 0.9.5)

EM: Expectation-Maximization clustering method

Description

Run the EM algorithm for clustering.

Usage

EM(d, clusters, model = "VVV", ...)

Arguments

d

The dataset (matrix or data.frame).

clusters

Either an integer (the number of clusters) or a (vector) indicating the cluster to which each point is initially allocated.

model

A character string indicating the model. The help file for mclustModelNames describes the available models.

...

Other parameters.

Value

A clustering model obtained by EM.

See Also

em, mstep, mclustModelNames

Examples

Run this code
# NOT RUN {
require (datasets)
data (iris)
EM (iris [, -5], 3) # Default initialization
km = KMEANS (iris [, -5], k = 3)
EM (iris [, -5], km$cluster) # Initialization with another clustering method
# }

Run the code above in your browser using DataLab