DPmeansClustering: DP-Means Clustering

View source: R/DPmeansClustering.R

DPmeansClusteringR Documentation

DP-Means Clustering

Description

DP-means creates new clusters using a threshold motivated by a small-variance limit of Dirichlet-process mixture models [Kulis/Jordan, 2012]. Uses T4cluster::dpmeans.

Usage

DPmeansClustering(Data, Lambda, PlotIt=FALSE, ...)

Arguments

Data

Numeric [1:n,1:d] data matrix with observations in rows. Missing and infinite values and dist objects are not accepted.

Lambda

Positive finite cluster-creation threshold, passed unchanged to T4cluster::dpmeans. Choose it for the scale of the data. There is no default.

PlotIt

Default: FALSE. If TRUE, plot the clustering using ClusterPlotMDS.

...

Further arguments to dpmeans: maxiter (default: 10, minimum: 5), eps (default: 1e-5), and permute (default: FALSE).

Details

The number of clusters is estimated rather than supplied. Increasing Lambda generally favors fewer clusters. Neither feature standardization nor threshold selection is performed by this wrapper. The T4cluster backend delegates the computation to maotai and may optionally permute the observation update order with permute=TRUE.

Value

List of

Cls

[1:n] numeric vector of cluster labels, named after the input observations. The number of clusters is estimated.

Object

Complete result of T4cluster::dpmeans.

Note

The optional package T4cluster is required. If it is missing, no computation is performed: a message is issued, Cls contains only 1, and Object contains the reason, following the FCPS wrapper convention.

Author(s)

Michael Thrun

References

[Kulis/Jordan, 2012] Kulis, B., & Jordan, M. I.: Revisiting k-means: New Algorithms via Bayesian Nonparametrics, Proceedings of the 29th International Conference on Machine Learning, pp. 1131-1138, 2012. https://people.eecs.berkeley.edu/~jordan/papers/kulis-jordan-icml12.pdf.

Examples

if (requireNamespace("T4cluster", quietly=TRUE)) {
  data("Hepta")
  out = DPmeansClustering(Hepta$Data, Lambda=5)
}

FCPS documentation built on Nov. 28, 2026, 9:08 a.m.