Learn R Programming

fdm2id (version 1.0.1)

EM: Expectation-Maximization clustering method

Description

Run the EM algorithm for clustering.

Usage

EM(d, k, model = "VVV", seed = NULL, ...)

Value

A clustering model obtained by EM.

Arguments

d

The dataset (matrix or data.frame).

k

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.

seed

A specified seed for random number generation (used only for the default k-means initialization).

...

Other parameters.

See Also

em, mstep, mclustModelNames

Examples

Run this code
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