Learn R Programming

conclust (version 1.1)

mpckm: MPC K-means algorithm

Description

This function takes an unlabeled dataset and two lists of must-link and cannot-link constraints as input and produce a clustering as output.

Usage

mpckm(data, k, mustLink, cantLink, maxIter = 10)

Arguments

data
The unlabeled dataset.
k
Number of clusters.
mustLink
A list of must-link constraints
cantLink
A list of cannot-link constraints
maxIter
Number of iteration

Value

A vector that represents the labels (clusters) of the data points

Details

This algorithm finds a clustering that satisfies as many constraints as possible

References

Bilenko, Basu, Mooney (2004), Integrating Constraints and Metric Learning in Semi-Supervised Clustering

See Also

Bilenko, Basu, Mooney (2004), Integrating Constraints and Metric Learning in Semi-Supervised Clustering

Examples

Run this code
data = matrix(c(0, 1, 1, 0, 0, 0, 1, 1), nrow = 4)
mustLink = matrix(c(1, 2), nrow = 1)
cantLink = matrix(c(1, 4), nrow = 1)
k = 2
pred = mpckm(data, k, mustLink, cantLink)
pred

Run the code above in your browser using DataLab