fm.kmeansR Documentation

KMeans clustering

Description

Perform k-means clustering on a data matrix.

Usage

fm.kmeans(data, centers, max.iters = 10, debug = FALSE, use.blas = FALSE)

Arguments

data

the input data matrix where each row is a data point.

centers

either the number of clusters, say k, or a set of initial (distinct) cluster centers. If a number, a random set of (distinct) rows in ‘x’ is chosen as the initial centers.

max.iters

the maximal number of iterations.

debug

This indicates whether to print debug info.

use.blas

a logical value indicating whether to use BLAS to compute Euclidean distance.

Value

a vector that contains cluster Ids for each data point.

Author(s)

Da Zheng <dzheng5@jhu.edu>